summaryrefslogtreecommitdiff
path: root/app/presenters
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2017-12-06 09:07:52 +0000
committerGrzegorz Bizon <grzegorz@gitlab.com>2017-12-06 09:07:52 +0000
commit29c243b08d91194d46203a085f6857fe966bcdff (patch)
treeee2f443ce026ce271fc579a6933d0f572a64ac87 /app/presenters
parent67a94b2ff3b0d714549c7d30b3c6212f3046a3c2 (diff)
parent0ef16b272002013bbdb44517e62f0a1d15046cf5 (diff)
downloadgitlab-ce-29c243b08d91194d46203a085f6857fe966bcdff.tar.gz
Merge branch 'list-multiple-clusters' into 'master'
List multiple clusters See merge request gitlab-org/gitlab-ce!15403
Diffstat (limited to 'app/presenters')
-rw-r--r--app/presenters/clusters/cluster_presenter.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/presenters/clusters/cluster_presenter.rb b/app/presenters/clusters/cluster_presenter.rb
index 01cb59d0d44..a424da5ab24 100644
--- a/app/presenters/clusters/cluster_presenter.rb
+++ b/app/presenters/clusters/cluster_presenter.rb
@@ -5,5 +5,9 @@ module Clusters
def gke_cluster_url
"https://console.cloud.google.com/kubernetes/clusters/details/#{provider.zone}/#{name}" if gcp?
end
+
+ def can_toggle_cluster?
+ can?(current_user, :update_cluster, cluster) && created?
+ end
end
end