debian-mirror-gitlab/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

2020-06-23 00:09:42 +05:30
# 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