# Moderators don't have access to Staff category

**URL:** https://meta.discourse.org/t/moderators-dont-have-access-to-staff-category/98839
**Category:** Support
**Created:** [5 באוקטובר,‏ 2018,‏ 6:33pm UTC](https://meta.discourse.org/t/moderators-dont-have-access-to-staff-category/98839 "2018-10-05T18:33:11Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![bokos](https://avatars.discourse-cdn.com/v4/letter/b/5e9695/32.png) [@bokos](https://meta.discourse.org/u/bokos)
#### Post date: [5 באוקטובר,‏ 2018,‏ 6:33pm UTC](https://meta.discourse.org/t/moderators-dont-have-access-to-staff-category/98839/1 "2018-10-05T18:33:12Z")

</div>

I noticed my moderators don’t have access to the Staff category. I just installed a fresh discourse locally to test it and it still happens.

I think it’s because my Discourse got installed in German and my Staff group is actually called Team.  
So I ran this in console:

```
staff = Category.find_by(id: SiteSetting.staff_category_id)
staff.group_names = [Group[:staff].name]
staff.save

```

I hope this doesn’t break anything?

---

<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: [5 באוקטובר,‏ 2018,‏ 9:11pm UTC](https://meta.discourse.org/t/moderators-dont-have-access-to-staff-category/98839/2 "2018-10-05T21:11:21Z")

</div>

Hmm, no, permissions aren’t set based on the text name of the category.

---

<div class="post-metadata">

### Author: ![bokos](https://avatars.discourse-cdn.com/v4/letter/b/5e9695/32.png) [@bokos](https://meta.discourse.org/u/bokos)
#### Post date: [5 באוקטובר,‏ 2018,‏ 9:41pm UTC](https://meta.discourse.org/t/moderators-dont-have-access-to-staff-category/98839/3 "2018-10-05T21:41:37Z")

</div>

I just noticed I have the same issue with the Lounge category.  
I think the group\_names=(names) method of the Category model should find the correct name of the group? Or change the fixtures?

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [5 באוקטובר,‏ 2018,‏ 10:14pm UTC](https://meta.discourse.org/t/moderators-dont-have-access-to-staff-category/98839/4 "2018-10-05T22:14:04Z")

</div>

Yes, it looks like we localise the group names here:

> <https://github.com/discourse/discourse/blob/cbb8f6f0fea62ae25f0d9e4c811e1b97b1f38593/app/models/group.rb#L273>

But then set category permissions using the unlocalised group name here:

> <https://github.com/discourse/discourse/blob/cbb8f6f0fea62ae25f0d9e4c811e1b97b1f38593/db/fixtures/502_staff_category.rb#L8>

I think this could do with some improvement

---

<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: [6 באוקטובר,‏ 2018,‏ 5:07am UTC](https://meta.discourse.org/t/moderators-dont-have-access-to-staff-category/98839/5 "2018-10-06T05:07:00Z")

</div>

Oh dear, I didn’t realize we were using the string names rather than the numeric codes. I wonder why we haven’t seen more complaints about this for Discourse instances in other languages?

---

<div class="post-metadata">

### Author: ![zoul](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zoul/32/460957_2.png) [@zoul](https://meta.discourse.org/u/zoul)
#### Post date: [6 באוקטובר,‏ 2018,‏ 6:46am UTC](https://meta.discourse.org/t/moderators-dont-have-access-to-staff-category/98839/6 "2018-10-06T06:46:23Z")

</div>

I’ve seen the same (or similar?) bug running Discourse in Czech and thought it was a random glitch related just to a single user. It went away after I temporarily turned the moderator into an admin and back IIRC, so I did not bother reporting it.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [23 ביוני,‏ 2021,‏ 4:47pm UTC](https://meta.discourse.org/t/moderators-dont-have-access-to-staff-category/98839/7 "2021-06-23T16:47:43Z")

</div>



---

<div class="post-metadata">

### Author: ![ErlendMS](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/erlendms/32/355598_2.png) [@ErlendMS](https://meta.discourse.org/u/ErlendMS)
#### Post date: [20 בינואר,‏ 2024,‏ 10:42am UTC](https://meta.discourse.org/t/moderators-dont-have-access-to-staff-category/98839/8 "2024-01-20T10:42:47Z")

</div>

I think I have the same issue here..?

I have a Norwegian install - and when I’m logged into my admin account, I can’t access the staff category. I see it in “All categories”, but when I click it it just keeps loading.

I made a test user and made it moderator - then _that_ user got access.
