summaryrefslogtreecommitdiff
path: root/app/policies/project_policy.rb
diff options
context:
space:
mode:
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? }