elasticsearch-api/lib/elasticsearch/api/actions/security/has_privileges.rb
def has_privileges(arguments = {})
          raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]

          arguments = arguments.clone
          headers = arguments.delete(:headers) || {}

          body = arguments.delete(:body)

          _user = arguments.delete(:user)

          method = Elasticsearch::API::HTTP_POST
          path   = if _user
                     "_security/user/#{Utils.__listify(_user)}/_has_privileges"
                   else
                     "_security/user/_has_privileges"
                   end
          params = {}

          Elasticsearch::API::Response.new(
            perform_request(method, path, params, body, headers)
          )
        end
# Determines whether the specified user has a specified list of privileges.
#
# @option arguments [String] :user Username
# @option arguments [Hash] :headers Custom HTTP headers
# @option arguments [Hash] :body The privileges to test (*Required*)
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-has-privileges.html
#
Determines whether the specified user has a specified list of privileges.
Determines whether the specified user has a specified list of privileges .
def has_privileges(arguments = {})
          raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
          arguments = arguments.clone
          headers = arguments.delete(:headers) || {}
          body = arguments.delete(:body)
          _user = arguments.delete(:user)
          method = Elasticsearch::API::HTTP_POST
          path   = if _user
                     "_security/user/#{Utils.__listify(_user)}/_has_privileges"
                   else
                     "_security/user/_has_privileges"
                   end
          params = {}
          Elasticsearch::API::Response.new(
            perform_request(method, path, params, body, headers)
          )
        end
def has_privileges ( arguments = { } ) raise ArgumentError , "Required argument 'body' missing" unless arguments [ :body ] arguments = arguments . clone headers = arguments . delete ( :headers ) || { } body = arguments . delete ( :body ) _user = arguments . delete ( :user ) method = Elasticsearch :: API :: HTTP_POST path = if _user "_security/user/#{Utils.__listify(_user)}/_has_privileges" else "_security/user/_has_privileges" end params = { } Elasticsearch :: API :: Response . new ( perform_request ( method , path , params , body , headers ) ) end
Determines whether the specified user has a specified list of privileges.
Determines whether the specified user has a specified list of privileges .
arguments
:body The privileges to test (*Required*)
: body The privileges to test ( * Required * )
see
None