# עדכון "Category default notifications" עבור קבוצות שאין להן הרשאה לראות את הקטגוריה

**URL:** https://meta.discourse.org/t/updating-category-default-notifications-for-groups-that-dont-have-permission-to-see-the-category/291050
**Category:** Bug
**Tags:** groups, notifications
**Created:** [9 בינואר,‏ 2024,‏ 6:24pm UTC](https://meta.discourse.org/t/updating-category-default-notifications-for-groups-that-dont-have-permission-to-see-the-category/291050 "2024-01-09T18:24:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jericson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jericson/32/116215_2.png) [@jericson](https://meta.discourse.org/u/jericson)
#### Post date: [9 בינואר,‏ 2024,‏ 6:24pm UTC](https://meta.discourse.org/t/updating-category-default-notifications-for-groups-that-dont-have-permission-to-see-the-category/291050/1 "2024-01-09T18:24:33Z")

</div>

It’s possible to add category notifications (via `/g/[group_name}/manage/categories`) for categories a group does not have permission to see. For instance, you can set all members of Trust\_level\_0 to watch the Staff category. There is even a prompt to apply the change historically:

 ![Screenshot 2024-01-09 at 9.57.14 AM](https://global.discourse-cdn.com/meta/original/4X/0/7/5/075b3d06191e5c06a396124c97ea77286301785e.png)

This would be _very bad_ ™ if Discourse actually made that change and started showing random users what staff members are saying in private. Thankfully the prompt is a lie. After making this very scary change (on a staging instance) I could impersonate a random user and see they didn’t have this set in their tracking preferences (`/my/preferences/tracking/`) and don’t get notified of new activity. Category security is working as expected.

That said, when I look at the user’s tracking preferences while logged in as an admin, I see this:

 ![Screenshot 2024-01-09 at 10.14.13 AM](https://global.discourse-cdn.com/meta/original/4X/9/2/4/924bd3ef244a3d05f239c29c0bf92afbf17fe0d4.png)

I can add them to all sorts of private categories, which can cause momentary panic if you don’t know that Discourse is managing things correctly behind the scenes.

I think the right approach would be to disallow admins from setting the tracking preferences for categories users can’t actually read. That means I can’t manually add a category while visiting another user’s profile unless they are in a group that can see the category. And if I use the bulk update to add an entire group to a category, I get an error if the group doesn’t have permission to read the category.

Is there any reason to let admins add notification settings that don’t actually send notifications? The only case I can think where it might make sense is if the admin plans to open up a category in the future and wants to have notifications for the appropriate group to be ready in advance. (But I don’t know if that’s a reasonable thing to do.)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [9 בינואר,‏ 2024,‏ 10:42pm UTC](https://meta.discourse.org/t/updating-category-default-notifications-for-groups-that-dont-have-permission-to-see-the-category/291050/2 "2024-01-09T22:42:12Z")

</div>

> [@jericson](#):
>
> This would be _very bad_ ™ if Discourse actually made that change and started showing random users what staff members are saying in private. Thankfully

No need to worry there, the notification pipeline always checks permission at the point we raise notifications.

So in this case no information would leak, we would just set the records up and if, by chance, the user gains visibility by becoming staff, they would auto watch.

Feels like this is mostly around improving the UX so it does not lie to the admin about what is going to happen.

---

<div class="post-metadata">

### Author: ![jericson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jericson/32/116215_2.png) [@jericson](https://meta.discourse.org/u/jericson)
#### Post date: [9 בינואר,‏ 2024,‏ 11:34pm UTC](https://meta.discourse.org/t/updating-category-default-notifications-for-groups-that-dont-have-permission-to-see-the-category/291050/3 "2024-01-09T23:34:50Z")

</div>

Right. The user has no idea this is going on, but the admin (especially an admin who is used to software that _might_ screw up something like this) would need to dig into something (email logs, impersonating another user, testing on staging, etc.) to verify that no notifications are actually sent.
