Class: Groups::DeployTokens::RevokeService

Inherits:
BaseService show all
Defined in:
app/services/groups/deploy_tokens/revoke_service.rb

Instance Attribute Summary collapse

Attributes inherited from BaseService

#current_user, #group, #params

Attributes inherited from BaseService

#current_user, #params, #project

Instance Method Summary collapse

Methods inherited from BaseService

#initialize

Methods inherited from BaseService

#initialize

Methods included from BaseServiceUtility

#deny_visibility_level, #event_service, #log_error, #log_info, #notification_service, #system_hook_service, #todo_service, #visibility_level

Methods included from Gitlab::Allowable

#can?

Constructor Details

This class inherits a constructor from Groups::BaseService

Instance Attribute Details

#tokenObject

Returns the value of attribute token.


6
7
8
# File 'app/services/groups/deploy_tokens/revoke_service.rb', line 6

def token
  @token
end

Instance Method Details

#executeObject


8
9
10
11
# File 'app/services/groups/deploy_tokens/revoke_service.rb', line 8

def execute
  @token = group.deploy_tokens.find(params[:id])
  @token.revoke!
end