summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-06-29 14:30:51 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-29 14:30:51 +0000
commite74db6bfa85dbeb243dafcdbf03c0e5aff3f6069 (patch)
treeb10184090863fcb73ebcc444cc6123cdfd7f9520 /app/services
parent5370ec1c3d27d646be672039e78161d22b1e2a80 (diff)
downloadgitlab-ce-e74db6bfa85dbeb243dafcdbf03c0e5aff3f6069.tar.gz
Add latest changes from gitlab-org/security/gitlab@15-1-stable-ee
Diffstat (limited to 'app/services')
-rw-r--r--app/services/auth/container_registry_authentication_service.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/services/auth/container_registry_authentication_service.rb b/app/services/auth/container_registry_authentication_service.rb
index 6d6d8641d9d..e806bef46fe 100644
--- a/app/services/auth/container_registry_authentication_service.rb
+++ b/app/services/auth/container_registry_authentication_service.rb
@@ -215,15 +215,13 @@ module Auth
def deploy_token_can_pull?(requested_project)
has_authentication_ability?(:read_container_image) &&
deploy_token.present? &&
- deploy_token.has_access_to?(requested_project) &&
- deploy_token.read_registry?
+ can?(deploy_token, :read_container_image, requested_project)
end
def deploy_token_can_push?(requested_project)
has_authentication_ability?(:create_container_image) &&
deploy_token.present? &&
- deploy_token.has_access_to?(requested_project) &&
- deploy_token.write_registry?
+ can?(deploy_token, :create_container_image, requested_project)
end
##