summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorJames Newton <hello@jamesnewton.com>2015-10-28 16:39:23 +0100
committerJames Newton <hello@jamesnewton.com>2015-10-29 11:00:17 +0100
commit3bb626f91cb50bd2eff58681e22db942b7d6a087 (patch)
tree643e740b70f97bd647c89ca46234c1d5e65f4f4e /config
parent98cc695afb2fc97a1ca897ad28741612bcde88a3 (diff)
downloadgitlab-ce-3bb626f91cb50bd2eff58681e22db942b7d6a087.tar.gz
refactor login as to be impersonation with better login/logout
Modifies the existing "login as" feature to be called impersonation, as well as keeping track of who is impersonating to revert back to that user without having to log out.
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/config/routes.rb b/config/routes.rb
index f6812c9280a..6ebedaefafe 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -212,6 +212,8 @@ Gitlab::Application.routes.draw do
resources :keys, only: [:show, :destroy]
resources :identities, only: [:index, :edit, :update, :destroy]
+ delete 'stop_impersonation' => 'impersonation#destroy', on: :collection
+
member do
get :projects
get :keys
@@ -221,7 +223,7 @@ Gitlab::Application.routes.draw do
put :unblock
put :unlock
put :confirm
- post :login_as
+ post 'impersonate' => 'impersonation#create'
patch :disable_two_factor
delete 'remove/:email_id', action: 'remove_email', as: 'remove_email'
end