diff options
author | Imre Farkas <ifarkas@gitlab.com> | 2018-11-08 18:03:56 +0300 |
---|---|---|
committer | Imre Farkas <ifarkas@gitlab.com> | 2018-11-12 14:16:25 +0300 |
commit | f3cd24a9f3f581488d621475e55e3a81bbd9e67c (patch) | |
tree | 66266d4ae8b2864a2e8423f7e8022483c357ccb9 /lib/api/users.rb | |
parent | 369631c84195f6b8b26624d5647ae994e64b77e8 (diff) |
Display impersonation token value only after creation
Since we migrated all PersonlAccessTokens to store only its hash in the
DB, the token value can no longer be shown to the user.
Diffstat (limited to 'lib/api/users.rb')
-rw-r--r-- | lib/api/users.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb index 2a56506f3a5..b41fce76df0 100644 --- a/lib/api/users.rb +++ b/lib/api/users.rb @@ -531,7 +531,7 @@ module API desc 'Create a impersonation token. Available only for admins.' do detail 'This feature was introduced in GitLab 9.0' - success Entities::ImpersonationToken + success Entities::ImpersonationTokenWithToken end params do requires :name, type: String, desc: 'The name of the impersonation token' @@ -542,7 +542,7 @@ module API impersonation_token = finder.build(declared_params(include_missing: false)) if impersonation_token.save - present impersonation_token, with: Entities::ImpersonationToken + present impersonation_token, with: Entities::ImpersonationTokenWithToken else render_validation_error!(impersonation_token) end |