diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-11-14 09:04:10 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-11-14 09:04:10 +0000 |
commit | aec9f211e534900f602e769dcdd6f69730849f92 (patch) | |
tree | 1dc20c8300782edb2fa7db1f646938d555950538 /config/routes.rb | |
parent | da8ca8b217d0c060ec509fd385842da29e4e4a86 (diff) | |
parent | 3bb626f91cb50bd2eff58681e22db942b7d6a087 (diff) | |
download | gitlab-ce-aec9f211e534900f602e769dcdd6f69730849f92.tar.gz |
Merge branch 'impersonate' into 'master'
refactor login as to be impersonation with better login/logout
Modifies the existing "login as" feature to be called impersonation.
This also adds:
* Application keep track of who is impersonating the user so they can revert back to the original user without having to log out.
* Stores the user profile via `HTTP_REFERER` so you get redirected back to the person you have impersonated once you stop.
## Screenshots:
![](http://sindacio.us/i/2015-10-28_17-52-41.png)
![](http://sindacio.us/i/2015-10-28_17-53-08.png)
See merge request !1702
Diffstat (limited to 'config/routes.rb')
-rw-r--r-- | config/routes.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/config/routes.rb b/config/routes.rb index 56a31d980f9..095c562be8d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -222,6 +222,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 @@ -231,7 +233,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 |