2019-04-09 22:13:43 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Clusters
|
|
|
|
class InstancePolicy < BasePolicy
|
2019-06-27 08:29:19 -04:00
|
|
|
rule { admin }.policy do
|
2019-04-09 22:13:43 -04:00
|
|
|
enable :read_cluster
|
|
|
|
enable :add_cluster
|
|
|
|
enable :create_cluster
|
|
|
|
enable :update_cluster
|
|
|
|
enable :admin_cluster
|
2019-09-07 04:24:33 -04:00
|
|
|
enable :read_prometheus
|
2019-04-09 22:13:43 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2019-10-15 02:07:25 -04:00
|
|
|
|
|
|
|
Clusters::InstancePolicy.prepend_if_ee('EE::Clusters::InstancePolicy')
|