# Hide text fragment from guests

**URL:** https://meta.discourse.org/t/hide-text-fragment-from-guests/308647
**Category:** Support
**Created:** [May 20, 2024, 2:17am UTC](https://meta.discourse.org/t/hide-text-fragment-from-guests/308647 "2024-05-20T02:17:08Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [May 20, 2024, 2:29pm UTC](https://meta.discourse.org/t/hide-text-fragment-from-guests/308647/7 "2024-05-20T14:29:23Z")

</div>

I did find this one. But may need some fixing at least for Tests-passed

> [@Display different content within a topic based on user's groups membership?](https://meta.discourse.org/t/display-different-content-within-a-topic-based-on-users-groups-membership/227075/6):
>
> Finally got around to knocking this together as, [https://github.com/Umbrella-CAST/discourse-umbrella-groupswitchdisplay](https://github.com/Umbrella-CAST/discourse-umbrella-groupswitchdisplay) Super simple, just removes the targeted DIV from the DOM based on is the current user in a group name “foobar” or not in the group via “!foobar”. That lets me have a simple toggle display of content like the below image. Of course, if the component is disabled, then all of the content shows (since sans component the DOM doesn’t get trimmed down.) But this is good enough for w…

Was having some issues getting to work right. Ie I could post as admin to show content to groupA. It will display for me Bing in that group but not my test user in that group

Blockquote from formatting bar may expose content if used. Would likely want to turn edits only viewable by staff..

As Jay said though a clever user could get around this. Plugin would be best with sensitive info.

If Self Hosted maybe a link to a Private topics(plugin) enabled category. Where only Staff can create topics and say your group can see. A link to a post in the private category should only work if current user is staff or your chosen group

---

_[View the full topic](https://meta.discourse.org/t/hide-text-fragment-from-guests/308647)._
