80 lines
4.3 KiB
Plaintext
80 lines
4.3 KiB
Plaintext
[[reference-security-has_privileges]]
|
|
|
|
////////
|
|
===========================================================================================================================
|
|
|| ||
|
|
|| ||
|
|
|| ||
|
|
|| ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ ||
|
|
|| ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ ||
|
|
|| ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ ||
|
|
|| ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ ||
|
|
|| ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ ||
|
|
|| ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ ||
|
|
|| ||
|
|
|| ||
|
|
|| This file is autogenerated, DO NOT send pull requests that changes this file directly. ||
|
|
|| You should update the script that does the generation, which can be found in: ||
|
|
|| https://github.com/elastic/elastic-client-generator-js ||
|
|
|| ||
|
|
|| You can run the script with the following command: ||
|
|
|| npm run elasticsearch -- --version <version> ||
|
|
|| ||
|
|
|| ||
|
|
|| ||
|
|
===========================================================================================================================
|
|
////////
|
|
|
|
[discrete]
|
|
=== client.security.hasPrivileges
|
|
|
|
Check user privileges. Determine whether the specified user has a specified list of privileges.
|
|
|
|
{ref}/security-api-has-privileges.html[{es} documentation]
|
|
|
|
[discrete]
|
|
==== Function signature
|
|
|
|
[source,ts]
|
|
----
|
|
(SecurityHasPrivilegesRequest, options?): Promise<SecurityHasPrivilegesResponse>
|
|
----
|
|
|
|
[discrete]
|
|
==== SecurityHasPrivilegesRequest
|
|
|
|
[pass]
|
|
++++
|
|
<pre>
|
|
++++
|
|
interface SecurityHasPrivilegesRequest extends <<RequestBase>> {
|
|
user?: <<Name>>
|
|
application?: SecurityHasPrivilegesApplicationPrivilegesCheck[]
|
|
cluster?: SecurityClusterPrivilege[]
|
|
index?: SecurityHasPrivilegesIndexPrivilegesCheck[]
|
|
}
|
|
|
|
[pass]
|
|
++++
|
|
</pre>
|
|
++++
|
|
[discrete]
|
|
==== SecurityHasPrivilegesResponse
|
|
|
|
[pass]
|
|
++++
|
|
<pre>
|
|
++++
|
|
interface SecurityHasPrivilegesResponse {
|
|
application: SecurityHasPrivilegesApplicationsPrivileges
|
|
cluster: Record<string, boolean>
|
|
has_all_requested: boolean
|
|
index: Record<<<IndexName>>, SecurityHasPrivilegesPrivileges>
|
|
username: <<Username>>
|
|
}
|
|
|
|
[pass]
|
|
++++
|
|
</pre>
|
|
++++
|