summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2017-04-13 11:34:16 +0000
committerTimothy Andrew <mail@timothyandrew.net>2017-04-13 13:13:22 +0000
commitbee780e8fdf56fa24b54326e9c27f0b1ab7446f7 (patch)
tree848f5b098a5da401eec063e77d8a9de4078619e4 /lib
parent7629c9ec57cb9b14f41c1163b61df1e6ea6b0ca1 (diff)
downloadgitlab-ce-bee780e8fdf56fa24b54326e9c27f0b1ab7446f7.tar.gz
Allow OAuth clients to push code30305-oauth-token-push-code
- We currently support fetching code with username = 'oauth2' and password = <access_token>. - Trying to _push_ code with the same credentials fails with an authentication error. - There's no reason this shouldn't be enabled, especially since we allow the OAuth client to create deploy keys with push access: https://docs.gitlab.com/ce/api/deploy_keys.html#add-deploy-key
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/auth.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/auth.rb b/lib/gitlab/auth.rb
index eee5601b0ed..ea918b23a63 100644
--- a/lib/gitlab/auth.rb
+++ b/lib/gitlab/auth.rb
@@ -108,7 +108,7 @@ module Gitlab
token = Doorkeeper::AccessToken.by_token(password)
if valid_oauth_token?(token)
user = User.find_by(id: token.resource_owner_id)
- Gitlab::Auth::Result.new(user, nil, :oauth, read_authentication_abilities)
+ Gitlab::Auth::Result.new(user, nil, :oauth, full_authentication_abilities)
end
end
end