# "Regular mode" for admins and moderators (e.g. something like "sudo")

**URL:** <https://meta.discourse.org/t/regular-mode-for-admins-and-moderators-e-g-something-like-sudo/211617>\
**Category:** Feature\
**Created:** [December 9, 2021, 2:35pm UTC](https://meta.discourse.org/t/regular-mode-for-admins-and-moderators-e-g-something-like-sudo/211617 "2021-12-09T14:35:00Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![mattdm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mattdm/32/216484_2.png) [@mattdm](https://meta.discourse.org/u/mattdm)\
**Post date:** [January 19, 2022, 6:50pm UTC](https://meta.discourse.org/t/regular-mode-for-admins-and-moderators-e-g-something-like-sudo/211617/20 "2022-01-19T18:50:41Z")

</div>

> [@leonardo](#):
>
> Just to add some color, the possiblity for an admin user to be acting as a regular user would add an extra dimension to absolutely all admin related authorization logic.
> 
> Even though that logic is mostly centralized in [`guardian.rb`](https://github.com/discourse/discourse/blob/main/lib/guardian.rb#L14) and [`/lib/guardian/*.rb`](https://github.com/discourse/discourse/tree/main/lib/guardian), the complexity and bug potential for such a change would be very large, and the necessity of this feature would need need for far outweigh that, which it doesn’t, given the alternatives.

So… I’ve been thinking about this, and I’m less convinced that it’s a big change after all. Sure, there’s lots of scattered logic, but doesn’t it all come down to checking `is_admin` or `is_staff`?

The “sudo” would just need to add a “staff\_mode” toggle, and `is_staff` and `is_admin` functions could check the state of that toggle `AND` the `user.admin` or `user.staff` flag. (Of course, activating the toggle would need a special check which _just_ looked at the `user.admin` or `user.staff` value.)

---

_[View the full topic](https://meta.discourse.org/t/regular-mode-for-admins-and-moderators-e-g-something-like-sudo/211617)._
