Introduce policy check for clusters navigation option

This commit is contained in:
Kamil Trzcinski 2017-10-03 23:22:35 +02:00
parent 2507652084
commit 25a1ef6933
2 changed files with 6 additions and 5 deletions

View File

@ -293,6 +293,7 @@ module ProjectsHelper
snippets: :read_project_snippet,
settings: :admin_project,
builds: :read_build,
clusters: :read_cluster,
labels: :read_label,
issues: :read_issue,
project_members: :read_project_member,

View File

@ -189,11 +189,11 @@
%span
Charts
-# - if project_nav_tab? :clusters TODO @shinya @ayufan
= nav_link(controller: :clusters) do
= link_to project_clusters_path(@project), title: 'Clusters', class: 'shortcuts-clusters' do
%span
Clusters
- if project_nav_tab? :clusters
= nav_link(controller: :clusters) do
= link_to project_clusters_path(@project), title: 'Clusters', class: 'shortcuts-clusters' do
%span
Clusters
- if project_nav_tab? :wiki
= nav_link(controller: :wikis) do