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

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

14 lines
279 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class DraftNotePolicy < BasePolicy
delegate { @subject.merge_request }
condition(:is_author) { @user && @subject.author == @user }
rule { is_author }.policy do
enable :read_note
enable :admin_note
enable :resolve_note
end
end