summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-06-01 22:42:53 -0700
committerStan Hu <stanhu@gmail.com>2015-06-01 22:42:53 -0700
commitcf7707b4fe474e5399481a04911cb08043c14874 (patch)
tree2d0a8c0664a284a273af4863f645a11ddce0e9c5 /app
parent76ae871908b83c9de9fb05f6cf491153209a79d4 (diff)
downloadgitlab-ce-cf7707b4fe474e5399481a04911cb08043c14874.tar.gz
Omit link to generate labels if user does not have access to create them
Closes https://github.com/gitlabhq/gitlabhq/issues/8353
Diffstat (limited to 'app')
-rw-r--r--app/views/projects/labels/index.html.haml5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/views/projects/labels/index.html.haml b/app/views/projects/labels/index.html.haml
index 7d19415a7f4..d44fe486212 100644
--- a/app/views/projects/labels/index.html.haml
+++ b/app/views/projects/labels/index.html.haml
@@ -13,4 +13,7 @@
= paginate @labels, theme: 'gitlab'
- else
.light-well
- .nothing-here-block Create first label or #{link_to 'generate', generate_namespace_project_labels_path(@project.namespace, @project), method: :post} default set of labels
+ - if can? current_user, :admin_label, @project
+ .nothing-here-block Create first label or #{link_to 'generate', generate_namespace_project_labels_path(@project.namespace, @project), method: :post} default set of labels
+ - else
+ .nothing-here-block No labels created