일정 시간 후 자동 종료되는 위장 기능 사용 경험

Fortsetzung der Diskussion von New Bug With Experimental Impersonation Interface:

The change is now stable and I can still reproduce that. Are there any plans to improve the experience for admins after the impersonation expires?

I think a better indication that you are no longer impersonating the user would help to prevent false negative testing where the admin thinks something works for normal users while in fact they are using their admin privileges.

Also, it’s confusing when the button to stop impersonating doesn’t work.

Example screenshot where it seems the user is able to see the staff (Team) category and showing the error using the stop impersonating button.

5개의 좋아요

Ah my bad I forgot about this, assigning myself to fix. I think it’s twofold:

  1. When the timer runs out, send a MessageBus update to the UI to show that the time limit has been reached. Maybe even show a timer in the UI…
  2. If you press “Stop Impersonating” and the time limit is up, don’t error, just reload the page

Might bump the time to 30 minutes too, 15 is pretty quick.

6개의 좋아요

Do you think it should be 15 minutes of inactivity instead of a countdown that starts when you start impersonating?

If you haven’t started yet I can have a look at this. :slightly_smiling_face:

2개의 좋아요

I’m not sure, I just wonder how we would define inactivity, if there’s already a way to know this? Also I’m not sure of the original intent of the timer, was it to make sure admins weren’t staying logged in too long generally to other people’s accounts? Would having the timer be delayed indefinitely go against that? Not sure…

If we can figure that out then of course I’m happy to hand this off to you if you’re happy to make a PR :slight_smile:

1개의 좋아요

Yeah. This predates me, so hard to infer. But since the duration is configurable, maybe better we don’t mess with this. :grimacing:

I can start with improving the UX for what’s there already with better messaging. :saluting_face:

1개의 좋아요

@martin Here’s a first take:

https://github.com/discourse/discourse/pull/39871

I decided to do it in the front-end first. We have the needed data there anyway. Rather than starting to fiddle with MessageBus.

1개의 좋아요