diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-30 00:08:27 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-30 00:08:27 +0300 |
commit | 836ddfc35d1778675b3bd6d51f51972f36a96bbe (patch) | |
tree | bc1c0247c76a2cbdbab94b3884bc040b179f41fe /app/policies/issuable_policy.rb | |
parent | 488e1b59feb4314b034636990bcc4e220e61f0ce (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/policies/issuable_policy.rb')
-rw-r--r-- | app/policies/issuable_policy.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/policies/issuable_policy.rb b/app/policies/issuable_policy.rb index e5913bab726..e864ce8752a 100644 --- a/app/policies/issuable_policy.rb +++ b/app/policies/issuable_policy.rb @@ -22,6 +22,12 @@ class IssuablePolicy < BasePolicy enable :reopen_issue end + # This rule replicates permissions in NotePolicy#can_read_confidential and it's used in + # TodoPolicy for performance reasons + rule { can?(:reporter_access) | assignee_or_author | admin }.policy do + enable :read_confidential_notes + end + rule { can?(:read_merge_request) & assignee_or_author }.policy do enable :update_merge_request enable :reopen_merge_request |