diff options
| author | Sean McGivern <sean@mcgivern.me.uk> | 2016-12-13 18:58:23 +0000 |
|---|---|---|
| committer | Sean McGivern <sean@mcgivern.me.uk> | 2016-12-13 18:58:23 +0000 |
| commit | e3231cc2979a1d4ab9b6865f9e2b6494f17b5d9b (patch) | |
| tree | 3787c38eb390d8a91e278f74afc27e40616c4a53 /lib/api/users.rb | |
| parent | 7b63587d5d8f9865408a474efef5ca6064c29155 (diff) | |
| parent | d95b709a66a5597dced25a2b9df9a1e24fc6d49a (diff) | |
| download | gitlab-ce-e3231cc2979a1d4ab9b6865f9e2b6494f17b5d9b.tar.gz | |
Merge branch '25482-fix-api-sudo' into 'master'
API: Memoize the current_user so that the sudo can work properly
Closes #25482
See merge request !8017
Diffstat (limited to 'lib/api/users.rb')
| -rw-r--r-- | lib/api/users.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb index 1dab799dd61..c7db2d71017 100644 --- a/lib/api/users.rb +++ b/lib/api/users.rb @@ -353,7 +353,7 @@ module API success Entities::UserPublic end get do - present current_user, with: @impersonator ? Entities::UserWithPrivateToken : Entities::UserPublic + present current_user, with: sudo? ? Entities::UserWithPrivateToken : Entities::UserPublic end desc "Get the currently authenticated user's SSH keys" do |
