Allow specific users to impersonate defined users

sau226
Thu, 28 Feb 2019 12:37:20 +0000
Development

How might I go about allowing specific users to impersonate others via a plugin?

For example say I have @SomeUser and @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 @SomeUser and @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?

10 messaggi - 4 partecipanti