How might I go about allowing specific users to impersonate others via a plugin?
For example say I have
@SomeUserAdmin on my instance. I want
@SomeUser to be a normal user (no admin or mod) but see the impersonate user button on
@SomeUserAdmin when logged in. This would be defined ideally from a site setting or user option although I can see why I might need to hardcode the user list.
If I log on as a user that has permission to impersonate another (e.g
@SomeUserAdmin) I should be able to see the impersonate button and all relevant controllers should allow the request to pass.
Does a plugin for Discourse exist that allows for this functionality. If not, is there any clues on where I should start hacking at first?