diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2018-04-05 12:22:34 -0500 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2018-04-06 21:20:16 -0500 |
commit | 8315861c9a50675b4f4f4ca536f0da90f27994f3 (patch) | |
tree | b5f25e5dbd74621ef77d480ba69f4f21d5c00d7d /app/services/auth | |
parent | 72220a99d1cdbcf8a914f9e765c43e63eaee2548 (diff) | |
download | gitlab-ce-8315861c9a50675b4f4f4ca536f0da90f27994f3.tar.gz |
Include ProjectDeployTokens
Also:
- Changes scopes from serializer to use boolean columns
- Fixes broken specs
Diffstat (limited to 'app/services/auth')
-rw-r--r-- | app/services/auth/container_registry_authentication_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/auth/container_registry_authentication_service.rb b/app/services/auth/container_registry_authentication_service.rb index 2ac35f5bd64..bb3ab856467 100644 --- a/app/services/auth/container_registry_authentication_service.rb +++ b/app/services/auth/container_registry_authentication_service.rb @@ -145,7 +145,7 @@ module Auth has_authentication_ability?(:read_container_image) && can_user?(:read_container_image, requested_project) end - + def deploy_token_can_pull?(requested_project) has_authentication_ability?(:read_container_image) && current_user.is_a?(DeployToken) && @@ -165,7 +165,7 @@ module Auth def user_can_push?(requested_project) has_authentication_ability?(:create_container_image) && - can_user?(current_user, :create_container_image, requested_project) + can_user?(:create_container_image, requested_project) end def error(code, status:, message: '') |