Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-27 00:09:22 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-27 00:09:22 +0300
commita8324cd026394f672b0ae482aef0f5007fe1db8e (patch)
tree32441bce3e2ae8440d122afd9194b9a8310d1cf5 /app/views
parent006a4f3c1c288c1ea59c3423225527897fa60d6e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views')
-rw-r--r--app/views/layouts/nav/sidebar/_project.html.haml2
-rw-r--r--app/views/projects/settings/access_tokens/index.html.haml13
2 files changed, 8 insertions, 7 deletions
diff --git a/app/views/layouts/nav/sidebar/_project.html.haml b/app/views/layouts/nav/sidebar/_project.html.haml
index 0e06accf2d1..b172ba67ef1 100644
--- a/app/views/layouts/nav/sidebar/_project.html.haml
+++ b/app/views/layouts/nav/sidebar/_project.html.haml
@@ -407,7 +407,7 @@
= link_to project_hooks_path(@project), title: _('Webhooks'), data: { qa_selector: 'webhooks_settings_link' } do
%span
= _('Webhooks')
- - if project_access_token_available?(@project)
+ - if can?(current_user, :read_resource_access_tokens, @project)
= nav_link(controller: [:access_tokens]) do
= link_to project_settings_access_tokens_path(@project), title: _('Access Tokens'), data: { qa_selector: 'access_tokens_settings_link' } do
%span
diff --git a/app/views/projects/settings/access_tokens/index.html.haml b/app/views/projects/settings/access_tokens/index.html.haml
index 100eb5991dc..c77eeb949d3 100644
--- a/app/views/projects/settings/access_tokens/index.html.haml
+++ b/app/views/projects/settings/access_tokens/index.html.haml
@@ -20,12 +20,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,