diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-21 02:50:22 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-21 02:50:22 +0300 |
commit | 9dc93a4519d9d5d7be48ff274127136236a3adb3 (patch) | |
tree | 70467ae3692a0e35e5ea56bcb803eb512a10bedb /app/views/projects/settings/access_tokens | |
parent | 4b0f34b6d759d6299322b3a54453e930c6121ff0 (diff) |
Add latest changes from gitlab-org/gitlab@13-11-stable-eev13.11.0-rc43
Diffstat (limited to 'app/views/projects/settings/access_tokens')
-rw-r--r-- | app/views/projects/settings/access_tokens/index.html.haml | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/app/views/projects/settings/access_tokens/index.html.haml b/app/views/projects/settings/access_tokens/index.html.haml index 100eb5991dc..01f3e441eef 100644 --- a/app/views/projects/settings/access_tokens/index.html.haml +++ b/app/views/projects/settings/access_tokens/index.html.haml @@ -9,10 +9,20 @@ %h4.gl-mt-0 = page_title %p + - if current_user.can?(:create_resource_access_tokens, @project) = _('You can generate an access token scoped to this project for each application to use the GitLab API.') - -# Commented out until https://gitlab.com/gitlab-org/gitlab/-/issues/219551 is fixed - -# %p - -# = _('You can also use project access tokens to authenticate against Git over HTTP.') + -# Commented out until https://gitlab.com/gitlab-org/gitlab/-/issues/219551 is fixed + -# %p + -# = _('You can also use project access tokens to authenticate against Git over HTTP.') + - else + = _('Project access token creation is disabled in this group. You can still use and manage existing tokens.') + %p + - root_group = @project.group.root_ancestor + - if current_user.can?(:admin_group, root_group) + - group_settings_link = edit_group_path(root_group) + - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: group_settings_link } + = _('You can enable project access token creation in %{link_start}group settings%{link_end}.').html_safe % { link_start: link_start, link_end: '</a>'.html_safe } + .col-lg-8 - if @new_project_access_token @@ -20,12 +30,13 @@ type: type, new_token_value: @new_project_access_token - = render 'shared/access_tokens/form', - type: type, - path: project_settings_access_tokens_path(@project), - token: @project_access_token, - scopes: @scopes, - prefix: :project_access_token + - if current_user.can?(:create_resource_access_tokens, @project) + = render 'shared/access_tokens/form', + type: type, + path: project_settings_access_tokens_path(@project), + token: @project_access_token, + scopes: @scopes, + prefix: :project_access_token = render 'shared/access_tokens/table', active_tokens: @active_project_access_tokens, |