diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /app/policies/note_policy.rb | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'app/policies/note_policy.rb')
-rw-r--r-- | app/policies/note_policy.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/policies/note_policy.rb b/app/policies/note_policy.rb index 9fd95bbe42d..ccc095f37da 100644 --- a/app/policies/note_policy.rb +++ b/app/policies/note_policy.rb @@ -18,7 +18,7 @@ class NotePolicy < BasePolicy condition(:is_visible) { @subject.system_note_visible_for?(@user) } - condition(:confidential, scope: :subject) { @subject.confidential? } + condition(:internal, scope: :subject) { @subject.confidential? } # if noteable is a work item it needs to check the notes widget availability condition(:notes_widget_enabled, scope: :subject) do @@ -28,7 +28,7 @@ class NotePolicy < BasePolicy # Should be matched with IssuablePolicy#read_internal_note # and EpicPolicy#read_internal_note - condition(:can_read_confidential) do + condition(:can_read_internal_note) do access_level >= Gitlab::Access::REPORTER || admin? end @@ -67,11 +67,11 @@ class NotePolicy < BasePolicy enable :resolve_note end - rule { can_read_confidential }.policy do - enable :mark_note_as_confidential + rule { can_read_internal_note }.policy do + enable :mark_note_as_internal end - rule { confidential & ~can_read_confidential }.policy do + rule { internal & ~can_read_internal_note }.policy do prevent :read_note prevent :admin_note prevent :resolve_note |