diff options
author | James Fargher <proglottis@gmail.com> | 2019-05-03 01:15:23 +0300 |
---|---|---|
committer | James Fargher <proglottis@gmail.com> | 2019-05-06 23:37:04 +0300 |
commit | 0aeef7335f5adcaf345e24377e63b2221721b346 (patch) | |
tree | 2b74f22a61a1661b3d9508ce35799d8372420384 /app/policies/clusters | |
parent | c40a99a05842d0976dd1bca532fbc67c0ccee04d (diff) |
Convert instance level clusters enabled to class method
Diffstat (limited to 'app/policies/clusters')
-rw-r--r-- | app/policies/clusters/instance_policy.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/policies/clusters/instance_policy.rb b/app/policies/clusters/instance_policy.rb index 0818a5b2604..e1045c85e6d 100644 --- a/app/policies/clusters/instance_policy.rb +++ b/app/policies/clusters/instance_policy.rb @@ -6,7 +6,7 @@ module Clusters condition(:has_clusters, scope: :subject) { clusterable_has_clusters? } condition(:can_have_multiple_clusters) { multiple_clusters_available? } - condition(:instance_clusters_enabled, scope: :subject) { @subject.instance_clusters_enabled? } + condition(:instance_clusters_enabled) { Instance.enabled? } rule { admin & instance_clusters_enabled }.policy do enable :read_cluster |