2017-10-23 04:36:35 -04:00
|
|
|
module Clusters
|
2017-10-03 10:44:06 -04:00
|
|
|
class ClusterPolicy < BasePolicy
|
|
|
|
alias_method :cluster, :subject
|
|
|
|
|
2017-10-23 04:36:35 -04:00
|
|
|
delegate { cluster.project }
|
2017-10-03 10:44:06 -04:00
|
|
|
|
2017-10-03 18:20:47 -04:00
|
|
|
rule { can?(:master_access) }.policy do
|
2017-10-03 10:44:06 -04:00
|
|
|
enable :update_cluster
|
|
|
|
enable :admin_cluster
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|