diff options
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/deploy_tokens_helper.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/helpers/deploy_tokens_helper.rb b/app/helpers/deploy_tokens_helper.rb index d6fbe0b6b45..560d2fcd29f 100644 --- a/app/helpers/deploy_tokens_helper.rb +++ b/app/helpers/deploy_tokens_helper.rb @@ -16,4 +16,11 @@ module DeployTokensHelper Gitlab.config.packages.enabled && can?(current_user, :read_package, group_or_project) end + + def deploy_token_revoke_button_data(token:, group_or_project:) + { + token: token.to_json(only: [:id, :name]), + revoke_path: revoke_deploy_token_path(group_or_project, token) + } + end end |