debian-mirror-gitlab/app/policies/draft_note_policy.rb
2020-06-23 00:09:42 +05:30

13 lines
279 B
Ruby

# 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