diff options
author | Mike Greiling <mike@pixelcog.com> | 2016-12-08 01:49:06 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2016-12-10 09:57:23 +0300 |
commit | 1ea478476404d6696d65269fd2ffe6ca29740035 (patch) | |
tree | 7dfe14a01b2f2198d00a36dbbce1fdbc5853fa61 /app/views/projects/snippets | |
parent | 68bb459b160419004ef2110b2824c8b2ab4c9739 (diff) |
ensure all snippets count badge is accurate for non team members
Diffstat (limited to 'app/views/projects/snippets')
-rw-r--r-- | app/views/projects/snippets/index.html.haml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/views/projects/snippets/index.html.haml b/app/views/projects/snippets/index.html.haml index 35c4e9d85ad..978f4b87564 100644 --- a/app/views/projects/snippets/index.html.haml +++ b/app/views/projects/snippets/index.html.haml @@ -7,7 +7,10 @@ = link_to namespace_project_snippets_path(@project.namespace, @project) do All %span.badge - = @project.snippets.count + - if @project.team.member?(current_user) || current_user.admin? + = @project.snippets.count + - else + = @project.snippets.public_and_internal.count - if @project.team.member?(current_user) || current_user.admin? %li{ class: ("active" if params[:scope] == "are_private") } |