[HLRC] Put Role (#36209)

This commit adds support for the put role API in the
java high level rest client.
This commit is contained in:
Albert Zaharovits 2018-12-10 09:41:31 +02:00 committed by GitHub
parent bf2c61d2d0
commit dad6f1c9fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 665 additions and 88 deletions

View file

@ -0,0 +1,37 @@
--
:api: put-role
:request: PutRoleRequest
:response: PutRoleResponse
--
[id="{upid}-{api}"]
=== Put Role API
[id="{upid}-{api}-request"]
==== Put Role Request
The +{request}+ class is used to create or update a role in the Native Roles
Store. The request contains a single role, which encapsulates privileges over
resources. A role can be assigned to an user using the
<<{upid}-put-role-mapping, Put Role Mapping API>>.
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-request]
--------------------------------------------------
include::../execution.asciidoc[]
[id="{upid}-{api}-response"]
==== Put Role Response
The returned +{response}+ contains a single field, `created`. This field
serves as an indication if the role was created or if an existing entry was
updated.
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-response]
--------------------------------------------------
<1> `created` is a boolean indicating whether the role was created or updated

View file

@ -385,6 +385,7 @@ The Java High Level REST Client supports the following Security APIs:
* <<java-rest-high-security-enable-user>>
* <<java-rest-high-security-disable-user>>
* <<java-rest-high-security-change-password>>
* <<{upid}-put-role>>
* <<{upid}-get-roles>>
* <<java-rest-high-security-delete-role>>
* <<{upid}-clear-roles-cache>>
@ -406,6 +407,7 @@ include::security/delete-user.asciidoc[]
include::security/enable-user.asciidoc[]
include::security/disable-user.asciidoc[]
include::security/change-password.asciidoc[]
include::security/put-role.asciidoc[]
include::security/get-roles.asciidoc[]
include::security/delete-role.asciidoc[]
include::security/delete-privileges.asciidoc[]