gitlab-org--gitlab-foss/app/policies/group_deploy_keys_group_policy.rb

9 lines
297 B
Ruby

# 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