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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
261 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class GroupDeployKeyPolicy < BasePolicy
with_options scope: :subject, score: 0
condition(:user_owns_group_deploy_key) { @subject.user_id == @user.id }
rule { user_owns_group_deploy_key }.enable :update_group_deploy_key
end