Welcome to mirror list, hosted at ThFree Co, Russian Federation.

draft_note_policy.rb « policies « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: be99d12c5f8c8d56f0ba4298920a4af3476a4d95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# 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