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 /app/views/layouts | |
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 'app/views/layouts')
-rw-r--r-- | app/views/layouts/header/_default.html.haml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml index c08a7b80744..3ca30d3baab 100644 --- a/app/views/layouts/header/_default.html.haml +++ b/app/views/layouts/header/_default.html.haml @@ -13,6 +13,10 @@ %li.visible-sm.visible-xs = link_to search_path, title: 'Search', data: {toggle: 'tooltip', placement: 'bottom'} do = icon('search') + - if session[:impersonator_id] + %li.impersonation + = link_to stop_impersonation_admin_users_path, method: :delete, title: 'Stop impersonation', data: { toggle: 'tooltip', placement: 'bottom' } do + = icon('user-secret fw') - if current_user.is_admin? %li = link_to admin_root_path, title: 'Admin area', data: {toggle: 'tooltip', placement: 'bottom'} do |