# Allow specific users to impersonate defined users

**URL:** <https://meta.discourse.org/t/allow-specific-users-to-impersonate-defined-users/110340>\
**Category:** Development\
**Tags:** impersonate\
**Created:** [February 28, 2019, 12:37pm UTC](https://meta.discourse.org/t/allow-specific-users-to-impersonate-defined-users/110340 "2019-02-28T12:37:20Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![sau226](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sau226/32/302324_2.png) [@sau226](https://meta.discourse.org/u/sau226)\
**Post date:** [February 28, 2019, 12:37pm UTC](https://meta.discourse.org/t/allow-specific-users-to-impersonate-defined-users/110340/1 "2019-02-28T12:37:20Z")

</div>

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?

---

_[View the full topic](https://meta.discourse.org/t/allow-specific-users-to-impersonate-defined-users/110340)._
