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 /spec/policies
parentb2e3da6a38f143a8c782dae4baceae3ed764733d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/policies')
-rw-r--r--spec/policies/global_policy_spec.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/policies/global_policy_spec.rb b/spec/policies/global_policy_spec.rb
index 2949320c571..0d91c288bbc 100644
--- a/spec/policies/global_policy_spec.rb
+++ b/spec/policies/global_policy_spec.rb
@@ -10,6 +10,7 @@ RSpec.describe GlobalPolicy, feature_category: :shared do
let_it_be(:service_account) { create(:user, :service_account) }
let_it_be(:migration_bot) { create(:user, :migration_bot) }
let_it_be(:security_bot) { create(:user, :security_bot) }
+ let_it_be(:llm_bot) { create(:user, :llm_bot) }
let_it_be_with_reload(:current_user) { create(:user) }
let_it_be(:user) { create(:user) }
@@ -238,6 +239,12 @@ RSpec.describe GlobalPolicy, feature_category: :shared do
it { is_expected.to be_disallowed(:access_api) }
end
+ context 'llm bot' do
+ let(:current_user) { llm_bot }
+
+ it { is_expected.to be_disallowed(:access_api) }
+ end
+
context 'user blocked pending approval' do
before do
current_user.block_pending_approval
@@ -617,6 +624,12 @@ RSpec.describe GlobalPolicy, feature_category: :shared do
it { is_expected.to be_disallowed(:log_in) }
end
+ context 'llm bot' do
+ let(:current_user) { llm_bot }
+
+ it { is_expected.to be_disallowed(:log_in) }
+ end
+
context 'user blocked pending approval' do
before do
current_user.block_pending_approval
@@ -657,6 +670,12 @@ RSpec.describe GlobalPolicy, feature_category: :shared do
it { is_expected.to be_disallowed(:create_instance_runner) }
end
+ context 'with llm_bot' do
+ let(:current_user) { llm_bot }
+
+ it { is_expected.to be_disallowed(:create_instance_runners) }
+ end
+
context 'with regular user' do
let(:current_user) { user }
@@ -704,6 +723,12 @@ RSpec.describe GlobalPolicy, feature_category: :shared do
it { is_expected.to be_disallowed(:create_instance_runner) }
end
+ context 'with llm_bot' do
+ let(:current_user) { llm_bot }
+
+ it { is_expected.to be_disallowed(:create_instance_runners) }
+ end
+
context 'with regular user' do
let(:current_user) { user }