summaryrefslogtreecommitdiff
path: root/app/policies
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-10-04 00:20:47 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2017-10-04 00:20:47 +0200
commitc6d53250de7f439bc25740913d85ada6e3b2fed4 (patch)
treeb93a8c9556851fda197f5a9bd7bfd6b540e2d44d /app/policies
parentc471430a13c79a82555ee171fecdf45b882a3c19 (diff)
downloadgitlab-ce-c6d53250de7f439bc25740913d85ada6e3b2fed4.tar.gz
Specify defaults, fix policies, fix db columns
Diffstat (limited to 'app/policies')
-rw-r--r--app/policies/gcp/cluster_policy.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/policies/gcp/cluster_policy.rb b/app/policies/gcp/cluster_policy.rb
index dd0a5bff146..e77173ea6e1 100644
--- a/app/policies/gcp/cluster_policy.rb
+++ b/app/policies/gcp/cluster_policy.rb
@@ -4,11 +4,7 @@ module Gcp
delegate { @subject.project }
- condition(:safe_to_change) do
- can?(:master_access) && !cluster.on_creation?
- end
-
- rule { safe_to_change }.policy do
+ rule { can?(:master_access) }.policy do
enable :update_cluster
enable :admin_cluster
end