# Moderator without access to a category can't change category notification settings for a user who does

**URL:** https://meta.discourse.org/t/moderator-without-access-to-a-category-cant-change-category-notification-settings-for-a-user-who-does/25636
**Category:** Bug
**Created:** [24 בפברואר,‏ 2015,‏ 10:41pm UTC](https://meta.discourse.org/t/moderator-without-access-to-a-category-cant-change-category-notification-settings-for-a-user-who-does/25636 "2015-02-24T22:41:43Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [24 בפברואר,‏ 2015,‏ 10:41pm UTC](https://meta.discourse.org/t/moderator-without-access-to-a-category-cant-change-category-notification-settings-for-a-user-who-does/25636/1 "2015-02-24T22:41:43Z")

</div>

I just made the odd discovery that, as a moderator with limited category permissions, I can can’t update the category notification settings for a user with access to the categories. To make matters worse, if I make any changes to a user’s preferences the category notification settings get changed. **This means that if someone was watching/tracking/muting a category before, they aren’t after the moderator saves the preferences.**

##Replication steps

- set up a user that has moderator privileges but limited access to one or more categories
- set up another user that has access to category/ies that the moderator does not have access to, and set some up to be watched/tracked/muted
- log in as admin, look at the user preferences and confirm the settings (see first screenshot below)
- log in as user with moderator privileges but without access to all categories and edit the user preferences of a user who has access to a category you do not (see second screenshot below)
- save changes.
- go back as admin to look at the user.. you will see the category notification settings are gone.

##How it should behave

The permissions on the user being edited should be reflected on the user page, not the permissions of the logged in user. So the moderator should be able to see and edit these category notification settings.

##Editing user’s preferences as admin

 ![](https://global.discourse-cdn.com/meta/original/3X/8/f/8f68ee382efe2ea0f5fde82d7d934f99bb418bc6.png)

##Editing user’s preferences as moderator with limited access to categories

 ![](https://global.discourse-cdn.com/meta/original/3X/c/4/c46af4026b7917691722f6c11c7c1cc5c02023ad.png)

---

<div class="post-metadata">

### Author: ![sigurdur](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sigurdur/32/122516_2.png) [@sigurdur](https://meta.discourse.org/u/sigurdur)
#### Post date: [24 בפברואר,‏ 2015,‏ 10:56pm UTC](https://meta.discourse.org/t/moderator-without-access-to-a-category-cant-change-category-notification-settings-for-a-user-who-does/25636/2 "2015-02-24T22:56:50Z")

</div>

Confirmed on my dev setup.

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [25 בפברואר,‏ 2015,‏ 3:04am UTC](https://meta.discourse.org/t/moderator-without-access-to-a-category-cant-change-category-notification-settings-for-a-user-who-does/25636/3 "2015-02-25T03:04:52Z")

</div>

I think the only possible fix to this involves revealing the fact that there are categories that exist but you don’t have access to.

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [25 בפברואר,‏ 2015,‏ 3:32am UTC](https://meta.discourse.org/t/moderator-without-access-to-a-category-cant-change-category-notification-settings-for-a-user-who-does/25636/4 "2015-02-25T03:32:48Z")

</div>

which shouldn’t be an issue if you’re a moderator trusted with the power to edit a user’s preferences. 😉

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [25 בפברואר,‏ 2015,‏ 4:06am UTC](https://meta.discourse.org/t/moderator-without-access-to-a-category-cant-change-category-notification-settings-for-a-user-who-does/25636/5 "2015-02-25T04:06:33Z")

</div>

Moderators do not have access to these and should not be able to see them, so your thesis is incorrect…

The issue with saving is legit, but the fix may be complex. I suggest avoiding these edits for now.

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [25 בפברואר,‏ 2015,‏ 4:25am UTC](https://meta.discourse.org/t/moderator-without-access-to-a-category-cant-change-category-notification-settings-for-a-user-who-does/25636/6 "2015-02-25T04:25:07Z")

</div>

Why are moderators allowed to edit user preferences in the first place? That seems like an admin privilege.

> [@codinghorror](#):
>
> your thesis is incorrect

I don’t know about others, but on my sites this is not an issue - moderators can know that the categories exist, but shouldn’t be able to see the contents of the ones they don’t have access to.

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [25 בפברואר,‏ 2015,‏ 3:03pm UTC](https://meta.discourse.org/t/moderator-without-access-to-a-category-cant-change-category-notification-settings-for-a-user-who-does/25636/7 "2015-02-25T15:03:03Z")

</div>

> [@tobiaseigen](#):
>
> I don’t know about others, but on my sites this is not an issue - moderators can know that the categories exist, but shouldn’t be able to see the contents of the ones they don’t have access to.

Agreed … the risk of a moderator simply **knowing a category exists** is low: moderate probability they find out about it, and trivial impact if they do. (What _could_ they do other than tell other people a secret category exists?)

> [@tobiaseigen](#):
>
> Why are moderators allowed to edit user preferences in the first place?

Also, QFT. I could see allowing them to edit things where someone could put spam links or offensive text, but preferences, no.

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [25 בפברואר,‏ 2015,‏ 3:33pm UTC](https://meta.discourse.org/t/moderator-without-access-to-a-category-cant-change-category-notification-settings-for-a-user-who-does/25636/8 "2015-02-25T15:33:09Z")

</div>

> [@codinghorror](#):
>
> I suggest avoiding these edits for now.

To be very clear - what @codinghorror is saying is that until this is resolved, all moderators with limited category permissions should be instructed not to edit preferences of other users at all, to avoid messing up their category notifications.

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [25 בפברואר,‏ 2015,‏ 3:40pm UTC](https://meta.discourse.org/t/moderator-without-access-to-a-category-cant-change-category-notification-settings-for-a-user-who-does/25636/9 "2015-02-25T15:40:28Z")

</div>

Could you maybe hide it with CSS?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [26 בפברואר,‏ 2015,‏ 12:01am UTC](https://meta.discourse.org/t/moderator-without-access-to-a-category-cant-change-category-notification-settings-for-a-user-who-does/25636/10 "2015-02-26T00:01:10Z")

</div>

Not really, once saved, it’ll save everything. It would need to be disabled in code.

---

<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: [13 ביולי,‏ 2016,‏ 4:11am UTC](https://meta.discourse.org/t/moderator-without-access-to-a-category-cant-change-category-notification-settings-for-a-user-who-does/25636/11 "2016-07-13T04:11:26Z")

</div>

Only thing we can do here is completely hide the “watching” etc fields from moderators, I think it is the most correct fix anyway.

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [13 ביולי,‏ 2016,‏ 7:37am UTC](https://meta.discourse.org/t/moderator-without-access-to-a-category-cant-change-category-notification-settings-for-a-user-who-does/25636/12 "2016-07-13T07:37:29Z")

</div>

OK I’d appreciate it if you could make this fix. Thanks!

Nice “I talk in rainbows” speech bubble on your discourse staff avatars, btw. 🙂

 ![](https://global.discourse-cdn.com/meta/original/3X/4/3/43627f8ea4621b6449709609f24f2429ad07af32.png) ![](https://global.discourse-cdn.com/meta/original/3X/b/4/b41429b53642fa6214ecf70bbca1607aa173cbe3.png)

---

<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: [1 ביוני,‏ 2017,‏ 7:26pm UTC](https://meta.discourse.org/t/moderator-without-access-to-a-category-cant-change-category-notification-settings-for-a-user-who-does/25636/13 "2017-06-01T19:26:32Z")

</div>

Fixed per:

[https://github.com/discourse/discourse/commit/e050308f3655b83285a1f41652e894583aa6a354](https://github.com/discourse/discourse/commit/e050308f3655b83285a1f41652e894583aa6a354)

 ![](https://global.discourse-cdn.com/meta/original/3X/9/5/959543465e29cc35a90877a2e6e2f0062cfae95d.png)

---

<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: [1 ביוני,‏ 2017,‏ 7:26pm UTC](https://meta.discourse.org/t/moderator-without-access-to-a-category-cant-change-category-notification-settings-for-a-user-who-does/25636/14 "2017-06-01T19:26:35Z")

</div>


