I have a private category on my Discourse site. By “private”, I mean only members of certain groups have access to the category. My boss wants the private category displayed to all users so that they can “yearn” (his word) to have access to it. Since the category won’t show up for people who are not in the special groups, I created a link to the category using the Admin Stylesheet and Header functions.
When “everyone” people click on the link to the private category, they see the 404 page that says “The page you requested doesn’t exist or is private.”
I would like “everyone” to be able to request an upgrade to their group membership via an easy-to-find link on that page. Can I add a link, or at least text, guiding them to send a Mod a private message? Or is there a more elegant solution?
I don’t think the lounge should be a “requestable” private category, as it is tied to Trust Level, and its security cannot be modified. To grant someone access to the Lounge, you would need to make them TL3. Besides, the lounge does not have read permissions for anyone else, so either you see it and have full access, or you don’t see it at all. Also, there is no permission to show categories in category view, but not have permission to click through to them - does your plugin create this “view”?
Ok, I understand your concerns perfectly. The plugin is still super green, but also the README can be misleading. In my production instance we don’t use the Staff or Lounge, or any other category with automatically managed permissions, so the technique (i.e. ugly hack) I’m using to show read-limited categories in the list doesn’t care about discriminating ones from the others.
So, yes: the Staff and Lounge categories will be shown and the plugin will pointlessly allow the user to request access to it. I intend to improve this in the future and I encourage you to open an issue in the repo so I don’t forget
Regarding your other question, the categories are shown but the link is removed, so you can’t click through to the topic list view for that category.
So nope: I’m not providing any new view. Instead of that, the plugin render a box encouraging the user to request access. This button just launches the private message composer pre-filled with some placeholder text.
I would like something like this, but with the ability to customize the text. For some private categories in my system, users can’t request access at all – but I’d like them to be visible.
I’d like to be able to link to my private categories and people can see a message I wrote about how to join the category rather than a weird error message!
I’ve looked into both of these solutions and they aren’t really what I’m looking for.
I just want the default category page to say something like “You do not have access to this category” and maybe let me customise what it says, not have to recreate category pages that don’t exist or open up all the topics…
That should be possible to change the text for that, not certain how that can be done but believe most all of the default text alerts can be edited.
Would be good to have something more professional than the “Oops! That page doesn’t exist or is private” page not found, especially since then no one will know if the page does or does not exist based on that.
You could enable the detailed-404 site setting, I believe it applies to categories too just got around to checking, it does not apply to categories, only topics unfortunately:
Beyond posting that on homepage, is the goal that if someone clicks link to topic in restricted category the notice will tell them how to gain access for that? Not sure if the existing detailed 404 alert would work for that or how that works, so if that doesn’t work you may need new feature.
You could also use a different platform like Patreon instead if this is for a paywall for subscribers that works for that and can be integrated with discourse.
I just think a 404 error is the wrong thing to show. It looks like there was a broken link or a problem somewhere. There is no indication that the link might work if they had different access levels.