Impersonating an unconfirmed users logs out the admin
Summary
When an admin tries to impersonate as an user who has not been confirmed yet, he gets logged out.
Steps to reproduce
-
create new new user but do not answer the confirmation mail
-
sign in as an admin user
-
select the user and press the "impersonate" button
What is the current bug behavior?
-
Admin gets logged out; he will see the login page with a red "you have to confirm your email address" banner
-
After logging in again, the right top corner contains a "stop impersonate" button
What is the expected correct behavior?
Either "impersonate" should not be possible for unconfirmed users, or impersonation should work like for confirmed users.
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Current User: git Using RVM: no Ruby Version: 2.3.6p384 Gem Version: 2.6.13 Bundler Version:1.13.7 Rake Version: 12.3.0 Redis Version: 3.2.11 Git Version: 2.14.3 Sidekiq Version:5.0.5 Go Version: unknownGitLab information Version: 10.5.2 Revision: b951e0d Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql Using LDAP: no Using Omniauth: no
Edited by Enrico Scholz