summaryrefslogtreecommitdiff
path: root/app/views/layouts/header/_default.html.haml
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 /app/views/layouts/header/_default.html.haml
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 'app/views/layouts/header/_default.html.haml')
-rw-r--r--app/views/layouts/header/_default.html.haml4
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 c31b1cbe9a8..13eeb0fe20b 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