Check for group membership in Header code?

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?