# Check for group membership in Header code?

**URL:** <https://meta.discourse.org/t/check-for-group-membership-in-header-code/72642>\
**Category:** UX\
**Created:** [23. Oktober 2017 um 21:03 UTC](https://meta.discourse.org/t/check-for-group-membership-in-header-code/72642 "2017-10-23T21:03:24Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![Cozdabuch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cozdabuch/32/139120_2.png) [@Cozdabuch](https://meta.discourse.org/u/Cozdabuch)\
**Post date:** [12. März 2019 um 11:38 UTC](https://meta.discourse.org/t/check-for-group-membership-in-header-code/72642/16 "2019-03-12T11:38:45Z")

</div>

I’m trying to do something with CSS (as a bandaid/painting with whiteout) since I have no “proper” way to do this.

I’m trying to hide all contents in a category from EVERYONE not in a specific group. While group permissions do the trick mostly, it doesn’t hide the contents from an admin. This is a problem with our board as the admin (me) should not see the contents of an executive group. (this is a business teams instance)

I know what and why this is a bandaid. Until the nature of things change with discourse access control, this is what I have to do.

  
 I want the category contents invisible to the admin(s), but visable to the members of the a specific group:

The category name: secretary  
The category id: 33  
The group: secretary

**Here’s my code that hides ALL within the category. It works to hide the content from the admin/(me).**

**This part works**

```
.topic-list-item.category-secretary { 
    display: none; 
}

```

**Here’s what I’ve tried to restore visability to the members of that group:**

**This part doesn’t work:**

```
.primary-group-secretary .topic-list-item.category-secretary { 
	    display: table-row; 
}

```

Can anyone help with this? Fix my code?

---

_[View the full topic](https://meta.discourse.org/t/check-for-group-membership-in-header-code/72642)._
