summaryrefslogtreecommitdiff
path: root/app/policies/issue_policy.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-18 19:00:14 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-18 19:00:14 +0000
commit05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch)
tree11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /app/policies/issue_policy.rb
parentec73467c23693d0db63a797d10194da9e72a74af (diff)
downloadgitlab-ce-05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2.tar.gz
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'app/policies/issue_policy.rb')
-rw-r--r--app/policies/issue_policy.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/policies/issue_policy.rb b/app/policies/issue_policy.rb
index 491eebe9daf..d1e35793c64 100644
--- a/app/policies/issue_policy.rb
+++ b/app/policies/issue_policy.rb
@@ -21,9 +21,6 @@ class IssuePolicy < IssuablePolicy
desc "Issue is confidential"
condition(:confidential, scope: :subject) { @subject.confidential? }
- desc "Issue is hidden"
- condition(:hidden, scope: :subject) { @subject.hidden? }
-
desc "Issue is persisted"
condition(:persisted, scope: :subject) { @subject.persisted? }
@@ -37,7 +34,7 @@ class IssuePolicy < IssuablePolicy
prevent :read_note
prevent :read_internal_note
prevent :set_note_created_at
- prevent :mark_note_as_confidential
+ prevent :mark_note_as_internal
# these actions on notes are not available on issues/work items yet,
# but preventing any action on work item notes as long as there is no notes widget seems reasonable
prevent :resolve_note
@@ -91,6 +88,10 @@ class IssuePolicy < IssuablePolicy
enable :set_confidentiality
end
+ rule { can?(:guest_access) & can?(:read_issue) }.policy do
+ enable :admin_issue_relation
+ end
+
rule { can_read_crm_contacts }.policy do
enable :read_crm_contacts
end
@@ -100,7 +101,7 @@ class IssuePolicy < IssuablePolicy
end
rule { can?(:reporter_access) }.policy do
- enable :mark_note_as_confidential
+ enable :mark_note_as_internal
end
end