diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-14 03:17:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-14 03:17:46 +0300 |
commit | 270353e1ff556a43333f82f171c3a485958126f0 (patch) | |
tree | c7bb4ac335b1e101b9bf92905ec2e8e170c6696c /app/policies | |
parent | b2e3da6a38f143a8c782dae4baceae3ed764733d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/base_policy.rb | 6 |
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 |