Lhc_fl
(Linca)
November 10, 2022, 2:04am
1
Hi, I’m an admin of a discourse forum. Due to the particularity of the forum, we often need to use the “unlisted” function.
When testing category moderators and tl4s, I noticed that they don’t see unlisted posts in their categories (even if they unlisted it themselves)
I checked Trust Level Permissions Reference and noticed that there’s no switch to enable them
Is this requirement reasonable? Are there any existing plugins that provide such a switch?
1 Like
not-ethan
(Ethan)
November 18, 2022, 5:48pm
2
I do think its reasonable since TL4 and cat mods can reply to closed topics and reply as much as they want to topics with slow mode. And they can unlist and relist topics anyways
ted
(Ted Johansson)
January 17, 2023, 8:50am
3
Good catch, @Lhc_fl !
It makes sense that TL4 users, who can list and unlist topics, should also be able to see topics that have been unlisted.
This has been fixed in:
discourse:main
← Drenmi:feature/tl4-users-list-unlisted-topics
opened 06:50AM - 17 Jan 23 UTC
### What is this change?
In response to [this Meta topic](https://meta.discou… rse.org/t/allow-tl4-or-cat-mod-to-see-unlisted-topics-in-topic-list/245069).
TL4 users can already list and unlist topics, but can not see topics that have been unlisted. This change brings that back to par by giving TL4 users the ability to see unlisted topics as well.
(This could technically be considered a fix, but it's a bit unclear, and so I labelled it as feature to highlight the change in behaviour.)
### What's the approach?
I've added a new `TopicGuardian#can_see_unlisted_topics?` which grants permission to staff and TL4 users. This encodes the fact that staff users can see unlisted posts explicitly. This was previously implicit in the `TopicQuery` code. (See inline comment for more details.)
### What else was considered?
It originally looked to me as though this could be yet another alias of `#can_perform_action_available_to_group_moderators?`, which is used as a shared check for a number of actions, such as archiving, pinning/unpinning, opening/closing, etc.
However, as I went down this route, I encountered more and more friction stemming from the fact that all the other actions are operations on a particular topic. The end result was that the `#can_perform_action_available_to_group_moderators?` lost its conceptual clarity, and so I decided on a separate method instead.
### Manual verification
- [x] Staff can still see unlisted topics.
- [x] Users can still see unlisted topics _when viewing their own topics_.
- [x] Users can not see unlisted topics under other filters.
- [x] TL4 users can now see unlisted topics.
6 Likes
Lhc_fl
(Linca)
January 17, 2023, 12:09pm
4
Wow, that’s awesome! Thanks for the fix!
3 Likes