diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-28 21:09:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-28 21:09:07 +0300 |
commit | 1c8fa70f9d0818e2a82089c8643a6e455bca47fd (patch) | |
tree | f339f97de0425270bdd909e2f4d378927b6e0a18 /app/helpers | |
parent | 736d36d8597d0d1ec1b47644e6d091c3f4a78f45 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/ci_variables_helper.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/helpers/ci_variables_helper.rb b/app/helpers/ci_variables_helper.rb index fc51f00d052..3f4c04070b5 100644 --- a/app/helpers/ci_variables_helper.rb +++ b/app/helpers/ci_variables_helper.rb @@ -5,6 +5,22 @@ module CiVariablesHelper Gitlab::CurrentSettings.current_application_settings.protected_ci_variables end + def create_deploy_token_path(entity, opts = {}) + if entity.is_a?(Group) + create_deploy_token_group_settings_ci_cd_path(entity, opts) + else + create_deploy_token_project_settings_repository_path(entity, opts) + end + end + + def revoke_deploy_token_path(entity, token) + if entity.is_a?(Group) + revoke_group_deploy_token_path(entity, token) + else + revoke_project_deploy_token_path(entity, token) + end + end + def ci_variable_protected?(variable, only_key_value) if variable && !only_key_value variable.protected |