# Theme - identify the trust level?

**URL:** https://meta.discourse.org/t/theme-identify-the-trust-level/293783
**Category:** General
**Created:** [February 1, 2024, 2:24pm UTC](https://meta.discourse.org/t/theme-identify-the-trust-level/293783 "2024-02-01T14:24:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://meta.discourse.org/u/EricGT)
#### Post date: [February 1, 2024, 2:24pm UTC](https://meta.discourse.org/t/theme-identify-the-trust-level/293783/1 "2024-02-01T14:24:56Z")

</div>

For a theme that adds JavaScript to the head, is it possible to identify the trust level of the user?

---

<div class="post-metadata">

### Author: ![Firepup650](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/firepup650/32/465200_2.png) [@Firepup650](https://meta.discourse.org/u/Firepup650)
#### Post date: [February 1, 2024, 2:29pm UTC](https://meta.discourse.org/t/theme-identify-the-trust-level/293783/2 "2024-02-01T14:29:38Z")

</div>

Seems like this theme component should help:

> [@CSS Classes for Current User's Groups](https://meta.discourse.org/t/css-classes-for-current-users-groups/226068):
>
> discourse2Summary CSS Classes for Current User’s Groups adds the groups that a member is a part of as CSS classes on the \<body\> tag.eyeglassesPreview [Preview on theme-creator.discourse.org](https://discourse.theme-creator.io/theme/Johani/user-groups-css-classes)hammer_and_wrenchRepository Link [https://github.com/discourse/discourse-groups-css-classes-in-body](https://github.com/discourse/discourse-groups-css-classes-in-body)open_bookNew to Discourse Themes? [Beginner’s guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966) Install this theme component Before: [image] After: [image] Discourse only adds the current us…

You just need to make sure to look for highest TL first before you check the lower groups, since everyone is a part of all TLs below their current one.

---

<div class="post-metadata">

### Author: ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://meta.discourse.org/u/EricGT)
#### Post date: [February 1, 2024, 2:37pm UTC](https://meta.discourse.org/t/theme-identify-the-trust-level/293783/3 "2024-02-01T14:37:28Z")

</div>

Thanks.

This might even be better.

Never occured to me that the code at that point could see groups and check that for a finer control of users.
