Admin Impersonate functionality is not working


(Love Chopra ) #1

I recently updated to latest version of discourse but it looks like Under Admin> Users > Impersonate functionality is not working.
I can’t able to impersonate any user.


(Jeff Atwood) #2

Hmm, can we verify this is still working and has not regressed @techapj?


(cpradio) #3

It seems to work for me in my dev evironment…


(Mittineague) #4

Same for me. However, I grepped “impersonate” and noticed

production.rb

developers have god like rights and may impersonate anyone in the system

normal admins may only impersonate other moderators (not admins)

guardian.rb

You must be an admin to impersonate


# You may not impersonate other admins unless you are a dev

AdminGuy1 was able to impersonate AdminGuy2 and Mittineague (the intended “main” Admin)

So maybe being a dev environment all Admins are developers and have “god like rights”


(Josef) #5

Is this fixed? I can’t seem to locate the Impersonate function either. The only option I have is to enter Anonymous User mode, and I really need to be able to impersonate some of our users for troubleshooting and support.


(Rafael dos Santos Silva) #6

Just impersonated someone two days ago, running latest Discourse.


(Josef) #7

Thanks, @Falco. What did you do to impersonate? Would you mind walking me through?


(Rafael dos Santos Silva) #8
  1. Go to the user profile you want to impersonate

  2. Click on the :wrench: Admin button

  3. Click on the Impersonate button on the top right.


(Josef) #9

Thanks again, @Falco. I tested this out — as mentioned above, it indeed looks like I can only impersonate folks who aren’t listed among our admins, though I wonder if that’s new?


(cpradio) #10

Why would you need to impersonate another admin? What are you trying to achieve?


(Josef) #11

I am trying to check on email notification settings for one of our admins who is reporting that she’s no longer receiving emails for new individual posts.


(cpradio) #12

You do know you don’t have to impersonate for that right? You can go to their public profile > preferences and view/alter them.

For the record, I can impersonate Admins on my sandbox


(Kane York) #13

You can only impersonate admins if you’re listed in the DEVELOPER_EMAILS environment variable.

I don’t remember the reasoning for this, but I think it’s related to worries of forging the staff actions log (which is relatively meaningless because restoring a doctored backup is almost undetectable except by (1) the loss of data or the use of read-only mode (2) looking for “restore completed” PMs from system. If I recall correctly.)