summaryrefslogtreecommitdiff
path: root/app/policies/group_deploy_keys_group_policy.rb
blob: 9275d5769235de255c7f02b754ce20802ad785bf (plain)
1
2
3
4
5
6
7
8
9
# frozen_string_literal: true

class GroupDeployKeysGroupPolicy < BasePolicy
  with_options scope: :subject, score: 0
  delegate { @subject.group }
  condition(:user_is_group_owner) { @subject.group.has_owner?(@user) }

  rule { user_is_group_owner }.enable :update_group_deploy_key_for_group
end