lib/dependency-tracker-client/api/permission_api.rb
# Removes the permission from the user.
# @param username [String] A valid username
# @param permission [String] A valid permission
# @param [Hash] opts the optional parameters
# @return [Array<(UserPrincipal, Integer, Hash)>] UserPrincipal data, response status code and response headers
Removes the permission from the user.
Removes the permission from the user .
def remove_permission_from_user_with_http_info(username, permission, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: PermissionApi.remove_permission_from_user ...'
      end
      if @api_client.config.client_side_validation && username.nil?
        fail ArgumentError, "Missing the required parameter 'username' when calling PermissionApi.remove_permission_from_user"
      end
      if @api_client.config.client_side_validation && permission.nil?
        fail ArgumentError, "Missing the required parameter 'permission' when calling PermissionApi.remove_permission_from_user"
      end
      local_var_path = '/v1/permission/{permission}/user/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s)).sub('{' + 'permission' + '}', CGI.escape(permission.to_s))
      query_params = opts[:query_params] || {}
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      form_params = opts[:form_params] || {}
      post_body = opts[:body] 
      return_type = opts[:return_type] || 'UserPrincipal' 
      auth_names = opts[:auth_names] || ['X-Api-Key']
      new_options = opts.merge(
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )
      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: PermissionApi#remove_permission_from_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def remove_permission_from_user_with_http_info ( username , permission , opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: PermissionApi.remove_permission_from_user ...' end if @api_client . config . client_side_validation && username . nil? fail ArgumentError , "Missing the required parameter 'username' when calling PermissionApi.remove_permission_from_user" end if @api_client . config . client_side_validation && permission . nil? fail ArgumentError , "Missing the required parameter 'permission' when calling PermissionApi.remove_permission_from_user" end local_var_path = '/v1/permission/{permission}/user/{username}' . sub ( '{' + 'username' + '}' , CGI . escape ( username . to_s ) ) . sub ( '{' + 'permission' + '}' , CGI . escape ( permission . to_s ) ) query_params = opts [ :query_params ] || { } header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] ) form_params = opts [ :form_params ] || { } post_body = opts [ :body ] return_type = opts [ :return_type ] || 'UserPrincipal' auth_names = opts [ :auth_names ] || [ 'X-Api-Key' ] new_options = opts . merge ( :header_params => header_params , :query_params => query_params , :form_params => form_params , :body => post_body , :auth_names => auth_names , :return_type => return_type ) data , status_code , headers = @api_client . call_api ( :DELETE , local_var_path , new_options ) if @api_client . config . debugging @api_client . config . logger . debug "API called: PermissionApi#remove_permission_from_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Removes the permission from the user.
Removes the permission from the user .
# verify the required parameter 'username' is set # verify the required parameter 'permission' is set # resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # form parameters # http body (model) # return_type # auth_names
UserPrincipal data, response status code and response headers
UserPrincipal data response status code and response headers
Array<(UserPrincipal, Integer, Hash)>
username
A valid username
A valid username
permission
A valid permission
A valid permission
opts
<not_specific>
<not_specific>
opts the optional parameters
opts the optional parameters