diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-20 13:49:51 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-20 13:49:51 +0000 |
commit | 71786ddc8e28fbd3cb3fcc4b3ff15e5962a1c82e (patch) | |
tree | 6a2d93ef3fb2d353bb7739e4b57e6541f51cdd71 /app/policies/note_policy.rb | |
parent | a7253423e3403b8c08f8a161e5937e1488f5f407 (diff) | |
download | gitlab-ce-71786ddc8e28fbd3cb3fcc4b3ff15e5962a1c82e.tar.gz |
Add latest changes from gitlab-org/gitlab@15-9-stable-eev15.9.0-rc42
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 |