diff options
| author | Pavel Forkert <fxposter@gmail.com> | 2015-09-24 16:14:16 +0300 |
|---|---|---|
| committer | Pavel Forkert <fxposter@gmail.com> | 2015-09-24 16:14:16 +0300 |
| commit | 83347954fc3c0c317c77f0528cdbaa456093771a (patch) | |
| tree | b9d2a290f762270b11c3753853b7d7584c1966c1 /app/controllers/admin | |
| parent | f2999fe8f3709775ea2151fa3dcd7c456267edb2 (diff) | |
| download | gitlab-ce-83347954fc3c0c317c77f0528cdbaa456093771a.tar.gz | |
Add option to admin area to sign in as a specific user
Closes #2291
Diffstat (limited to 'app/controllers/admin')
| -rw-r--r-- | app/controllers/admin/users_controller.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index a19b1abee27..00f41a10dd1 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -63,6 +63,12 @@ class Admin::UsersController < Admin::ApplicationController end end + def login_as + sign_in(user) + flash[:alert] = "Logged in as #{user.username}" + redirect_to root_path + end + def disable_two_factor user.disable_two_factor! redirect_to admin_user_path(user), |
