summaryrefslogtreecommitdiff
path: root/app/policies/project_policy.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-13 03:06:53 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-13 03:06:53 +0000
commitc0b9c14ebd1524a1e2334e656f997ec680a18966 (patch)
tree4437aea2c4239279131a56adca1679f636683d29 /app/policies/project_policy.rb
parent98638cd5e43611aac2193a5c2f80f72374040430 (diff)
downloadgitlab-ce-c0b9c14ebd1524a1e2334e656f997ec680a18966.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/policies/project_policy.rb')
-rw-r--r--app/policies/project_policy.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/policies/project_policy.rb b/app/policies/project_policy.rb
index c963b364e4a..47d8d0eef3e 100644
--- a/app/policies/project_policy.rb
+++ b/app/policies/project_policy.rb
@@ -38,6 +38,9 @@ class ProjectPolicy < BasePolicy
desc "User is a project bot"
condition(:project_bot) { user.project_bot? && team_member? }
+ desc "User is a security policy bot on the project"
+ condition(:security_policy_bot) { user&.security_policy_bot? && team_member? }
+
desc "Project is public"
condition(:public_project, scope: :subject, score: 0) { project.public? }