-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
8 changed files
with
88 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
rest-api-spec/src/main/resources/rest-api-spec/api/security.get_user_privileges.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
x-pack/docs/en/rest-api/security/get-user-privileges.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
[role="xpack"] | ||
[[security-api-get-user-privileges]] | ||
=== Get user privileges API | ||
++++ | ||
<titleabbrev>Get user privileges</titleabbrev> | ||
++++ | ||
|
||
Retrieves the <<security-privileges,security privileges>> for the logged in | ||
user. | ||
|
||
[[security-api-get-user-privileges-request]] | ||
==== {api-request-title} | ||
|
||
`GET /_security/user/_privileges` | ||
|
||
[[security-api-get-user-privileges-prereqs]] | ||
==== {api-prereq-title} | ||
|
||
* All users can use this API, but only to determine their own privileges. To | ||
check the privileges of other users, you must use the run as feature. For | ||
more information, see <<run-as-privilege>>. | ||
|
||
[[security-api-get-user-privileges-desc]] | ||
==== {api-description-title} | ||
|
||
To check whether a user has a specific list of privileges, use the | ||
<<security-api-has-privileges,has privileges API>>. | ||
|
||
|
||
[[security-api-get-user-privileges-example]] | ||
==== {api-examples-title} | ||
|
||
[source,console] | ||
-------------------------------------------------- | ||
GET /_security/user/_privileges | ||
-------------------------------------------------- | ||
|
||
[source,console-result] | ||
-------------------------------------------------- | ||
{ | ||
"cluster" : [ | ||
"all" | ||
], | ||
"global" : [ ], | ||
"indices" : [ | ||
{ | ||
"names" : [ | ||
"*" | ||
], | ||
"privileges" : [ | ||
"all" | ||
], | ||
"allow_restricted_indices" : true | ||
} | ||
], | ||
"applications" : [ | ||
{ | ||
"application" : "*", | ||
"privileges" : [ | ||
"*" | ||
], | ||
"resources" : [ | ||
"*" | ||
] | ||
} | ||
], | ||
"run_as" : [ | ||
"*" | ||
] | ||
} | ||
-------------------------------------------------- | ||
// TESTRESPONSE[s/: false/: true/] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters