gitlab-org--gitlab-foss/app/policies/clusters/cluster_policy.rb
Thong Kuah dcf0caaa06 Add policy for clusters on group level
- maintainer for group can read, create, update, and admin cluster
- project user, at any level, cannot do anything with group cluster
2018-11-08 23:14:06 +13:00

10 lines
193 B
Ruby

# frozen_string_literal: true
module Clusters
class ClusterPolicy < BasePolicy
alias_method :cluster, :subject
delegate { cluster.group }
delegate { cluster.project }
end
end