summaryrefslogtreecommitdiff
path: root/app/presenters
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2018-11-06 21:55:10 +1300
committerThong Kuah <tkuah@gitlab.com>2018-11-08 23:28:30 +1300
commit5a042ef2fbe1bd57b9428c89b49d2fa1e248ad46 (patch)
tree15130ca3700f2da12044087510128a715758d6e0 /app/presenters
parent530371840288af4bc54bc2c32c602e568ce20854 (diff)
downloadgitlab-ce-5a042ef2fbe1bd57b9428c89b49d2fa1e248ad46.tar.gz
Only project clusters has Project Namespace field
Group clusters should not allow Project Namespace so don't show that field input too
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 7e6eccb648c..01e7ed92515 100644
--- a/app/presenters/clusters/cluster_presenter.rb
+++ b/app/presenters/clusters/cluster_presenter.rb
@@ -8,6 +8,10 @@ module Clusters
"https://console.cloud.google.com/kubernetes/clusters/details/#{provider.zone}/#{name}" if gcp?
end
+ def allow_project_namespace?
+ cluster.project_type?
+ end
+
def can_toggle_cluster?
can?(current_user, :update_cluster, cluster) && created?
end