lib/elasticsearch/api/actions/security/has_privileges.rb in elasticsearch-api-8.0.1 vs lib/elasticsearch/api/actions/security/has_privileges.rb in elasticsearch-api-8.1.0
- old
+ new
@@ -23,18 +23,19 @@
#
# @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
+ # @see https://www.elastic.co/guide/en/elasticsearch/reference/8.1/security-api-has-privileges.html
#
def has_privileges(arguments = {})
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
- arguments = arguments.clone
headers = arguments.delete(:headers) || {}
body = arguments.delete(:body)
+
+ arguments = arguments.clone
_user = arguments.delete(:user)
method = Elasticsearch::API::HTTP_POST
path = if _user