# 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:** 2

<div class="post-metadata">

**Author:** ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)\
**Post date:** [February 28, 2019, 2:53pm UTC](https://meta.discourse.org/t/allow-specific-users-to-impersonate-defined-users/110340/2 "2019-02-28T14:53:41Z")

</div>

> [@sau226](#):
>
> is there any clues on where I should start hacking at first?

You will have to write a plugin that will overwrite the `can_impersonate?` method

> <https://github.com/discourse/discourse/blob/fabeba788d06481bba054fa674b9938125d6a1eb/lib/guardian.rb#L197-L209>

---

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