cluster_policy.rb 276 Bytes
Newer Older
1 2
# frozen_string_literal: true

Shinya Maeda's avatar
Shinya Maeda committed
3
module Clusters
4 5 6
  class ClusterPolicy < BasePolicy
    alias_method :cluster, :subject

Shinya Maeda's avatar
Shinya Maeda committed
7
    delegate { cluster.project }
8

9
    rule { can?(:maintainer_access) }.policy do
10 11 12 13 14
      enable :update_cluster
      enable :admin_cluster
    end
  end
end