diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-29 00:09:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-29 00:09:35 +0300 |
commit | 646f753b0bce6cefdebd59e68df624c8f9bef584 (patch) | |
tree | 48aa667e62e84d097fc30cec5df5a0cff72078ef /app/policies/todo_policy.rb | |
parent | 891529770382ed0591209570567f17605524ef39 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/policies/todo_policy.rb')
-rw-r--r-- | app/policies/todo_policy.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/policies/todo_policy.rb b/app/policies/todo_policy.rb index d63eb9407f8..3b4be29664f 100644 --- a/app/policies/todo_policy.rb +++ b/app/policies/todo_policy.rb @@ -11,18 +11,18 @@ class TodoPolicy < BasePolicy @user && @subject.target&.readable_by?(@user) end - desc "Todo has confidential note" - condition(:has_confidential_note, scope: :subject) { @subject&.note&.confidential? } + desc "Todo has internal note" + condition(:has_internal_note, scope: :subject) { @subject&.note&.confidential? } - desc "User can read the todo's confidential note" - condition(:can_read_todo_confidential_note) do + desc "User can read the todo's internal note" + condition(:can_read_todo_internal_note) do @user && @user.can?(:read_internal_note, @subject.target) end rule { own_todo & can_read_target }.enable :read_todo rule { can?(:read_todo) }.enable :update_todo - rule { has_confidential_note & ~can_read_todo_confidential_note }.policy do + rule { has_internal_note & ~can_read_todo_internal_note }.policy do prevent :read_todo prevent :update_todo end |