diff options
Diffstat (limited to 'app/policies/note_policy.rb')
-rw-r--r-- | app/policies/note_policy.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/app/policies/note_policy.rb b/app/policies/note_policy.rb index ccc095f37da..189609c2600 100644 --- a/app/policies/note_policy.rb +++ b/app/policies/note_policy.rb @@ -26,12 +26,6 @@ class NotePolicy < BasePolicy @subject.noteable.work_item_type.widgets.include?(::WorkItems::Widgets::Notes) end - # Should be matched with IssuablePolicy#read_internal_note - # and EpicPolicy#read_internal_note - condition(:can_read_internal_note) do - access_level >= Gitlab::Access::REPORTER || admin? - end - rule { ~notes_widget_enabled }.prevent_all rule { ~editable }.prevent :admin_note @@ -67,11 +61,11 @@ class NotePolicy < BasePolicy enable :resolve_note end - rule { can_read_internal_note }.policy do + rule { can?(:read_internal_note) }.policy do enable :mark_note_as_internal end - rule { internal & ~can_read_internal_note }.policy do + rule { internal & ~can?(:read_internal_note) }.policy do prevent :read_note prevent :admin_note prevent :resolve_note |