Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-04-14 03:17:46 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-04-14 03:17:46 +0300
commit270353e1ff556a43333f82f171c3a485958126f0 (patch)
treec7bb4ac335b1e101b9bf92905ec2e8e170c6696c /app/policies
parentb2e3da6a38f143a8c782dae4baceae3ed764733d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/policies')
-rw-r--r--app/policies/base_policy.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/policies/base_policy.rb b/app/policies/base_policy.rb
index 1ce866bd910..7c745c5731f 100644
--- a/app/policies/base_policy.rb
+++ b/app/policies/base_policy.rb
@@ -39,6 +39,10 @@ class BasePolicy < DeclarativePolicy::Base
with_options scope: :user, score: 0
condition(:automation_bot) { @user&.automation_bot? }
+ desc "User is llm bot"
+ with_options scope: :user, score: 0
+ condition(:llm_bot) { @user&.llm_bot? }
+
desc "User email is unconfirmed or user account is locked"
with_options scope: :user, score: 0
condition(:inactive) { @user&.confirmation_required_on_sign_in? || @user&.access_locked? }
@@ -63,7 +67,7 @@ class BasePolicy < DeclarativePolicy::Base
end
rule { admin }.policy do
- # Only for actual administrator accounts, behaviour affected by admin mode application setting
+ # Only for actual administrator accounts, behavior affected by admin mode application setting
enable :admin_all_resources
# Policy extended in EE to also enable auditors
enable :read_all_resources