[[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 || || || || || || || =========================================================================================================================== //////// [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 ---- [discrete] ===== `SecurityHasPrivilegesRequest` [source,ts] ---- interface SecurityHasPrivilegesRequest extends <> { user?: <> application?: SecurityHasPrivilegesApplicationPrivilegesCheck[] cluster?: SecurityClusterPrivilege[] index?: SecurityHasPrivilegesIndexPrivilegesCheck[] } ---- [discrete] ===== `SecurityHasPrivilegesResponse` [source,ts] ---- interface SecurityHasPrivilegesResponse { application: SecurityHasPrivilegesApplicationsPrivileges cluster: Record has_all_requested: boolean index: Record<<>, SecurityHasPrivilegesPrivileges> username: <> } ----