diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-12-06 09:07:52 +0000 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2017-12-06 09:07:52 +0000 |
commit | 29c243b08d91194d46203a085f6857fe966bcdff (patch) | |
tree | ee2f443ce026ce271fc579a6933d0f572a64ac87 /app/presenters | |
parent | 67a94b2ff3b0d714549c7d30b3c6212f3046a3c2 (diff) | |
parent | 0ef16b272002013bbdb44517e62f0a1d15046cf5 (diff) | |
download | gitlab-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.rb | 4 |
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 |