diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-11-24 09:09:38 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-11-24 09:09:38 +0000 |
commit | 89c9d2ad6b792885d234f153f2e13ee96639e4f8 (patch) | |
tree | aeafc6639041b20cce6c09aff29b17704adb0dd8 /spec/lib | |
parent | fad4ab7d56ea1deb415adff541212ae901e31fd4 (diff) | |
parent | 453b17809395fda045f5685268cae58c1dceb881 (diff) | |
download | gitlab-ce-89c9d2ad6b792885d234f153f2e13ee96639e4f8.tar.gz |
Merge branch 'dm-fix-registry-with-sudo-token' into 'master'
Fix pulling and pushing using a personal access token with the sudo scope
Closes #40466
See merge request gitlab-org/gitlab-ce!15571
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/auth_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/lib/gitlab/auth_spec.rb b/spec/lib/gitlab/auth_spec.rb index 5e822a0026a..a6fbec295b5 100644 --- a/spec/lib/gitlab/auth_spec.rb +++ b/spec/lib/gitlab/auth_spec.rb @@ -207,7 +207,7 @@ describe Gitlab::Auth do end it 'limits abilities based on scope' do - personal_access_token = create(:personal_access_token, scopes: ['read_user']) + personal_access_token = create(:personal_access_token, scopes: %w[read_user sudo]) expect(gl_auth).to receive(:rate_limit!).with('ip', success: true, login: '') expect(gl_auth.find_for_git_client('', personal_access_token.token, project: nil, ip: 'ip')).to eq(Gitlab::Auth::Result.new(personal_access_token.user, nil, :personal_access_token, [])) |