summaryrefslogtreecommitdiff
path: root/spec/services/auth
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-09-01 16:52:41 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-01 16:52:41 +0000
commita986819a7bce2002018dfafed3900dc3f2e8fb81 (patch)
tree15c063738d999a0aff035c4842885276a9ab6ac4 /spec/services/auth
parent92d5172ad42ebc62eb78cac21b1e236ad6ace580 (diff)
downloadgitlab-ce-a986819a7bce2002018dfafed3900dc3f2e8fb81.tar.gz
Add latest changes from gitlab-org/security/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/services/auth')
-rw-r--r--spec/services/auth/container_registry_authentication_service_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/services/auth/container_registry_authentication_service_spec.rb b/spec/services/auth/container_registry_authentication_service_spec.rb
index 8d58c4b27e1..bc85f4f0087 100644
--- a/spec/services/auth/container_registry_authentication_service_spec.rb
+++ b/spec/services/auth/container_registry_authentication_service_spec.rb
@@ -654,6 +654,19 @@ RSpec.describe Auth::ContainerRegistryAuthenticationService do
it_behaves_like 'not a container repository factory'
end
end
+
+ context 'for project that disables repository' do
+ let(:project) { create(:project, :public, :repository_disabled) }
+
+ context 'disallow when pulling' do
+ let(:current_params) do
+ { scopes: ["repository:#{project.full_path}:pull"] }
+ end
+
+ it_behaves_like 'an inaccessible'
+ it_behaves_like 'not a container repository factory'
+ end
+ end
end
context 'registry catalog browsing authorized as admin' do