debian-mirror-gitlab/app/policies/group_deploy_keys_group_policy.rb
2020-10-24 23:57:45 +05:30

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