# Show BUTTON only to staff users

**URL:** https://meta.discourse.org/t/show-button-only-to-staff-users/149552
**Category:** Support
**Created:** [April 28, 2020, 6:08am UTC](https://meta.discourse.org/t/show-button-only-to-staff-users/149552 "2020-04-28T06:08:06Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![Ed\_Bobkov](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ed_bobkov/32/200014_2.png) [@Ed\_Bobkov](https://meta.discourse.org/u/Ed_Bobkov)
#### Post date: [April 28, 2020, 7:50am UTC](https://meta.discourse.org/t/show-button-only-to-staff-users/149552/3 "2020-04-28T07:50:29Z")

</div>

Great! It’s working!  
Also I found these topics, that may be userful for smbd.

> [@Admin only button in header?](https://meta.discourse.org/t/admin-only-button-in-header/98732/2):
>
> Discourse adds a staff class to the body tag when a staff user is viewing the site. If you are ok with the button being visible to admins and moderators, you could hide the button with CSS and then make it visible when the staff class is present. If only having the button visible to admins is a requirement, you will need to use some javascript to determine that the user is an admin. The easiest approach to that would be to add an admin class to the body and then make the button visible when the…

> [@Show custom HTML in header to member of a specific group](https://meta.discourse.org/t/show-custom-html-in-header-to-member-of-a-specific-group/142974/3):
>
> \<div id="after-header"\>Stuff\</div\> \<script type="text/discourse-plugin" version="0.8"\> api.onPageChange(() =\> { let currentUser = api.getCurrentUser(); var groups = currentUser.groups; const isInGroup1 = groups.some(g =\> g.name === 'group1'); const isInGroup2 = groups.some(g =\> g.name === 'group2'); const isInGroup3 = groups.some(g =\> g.name === 'group3'); if (isInGroup1) { $("#after-header").addClass("group1"); } …

---

_[View the full topic](https://meta.discourse.org/t/show-button-only-to-staff-users/149552)._
