Demander l'accès à une catégorie privée

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?

7 « J'aime »

I don’t think there’s any way to do this now, so I changed it to the “feature” category.

This would be a nice competition to features included with tools like Google Groups, private email lists, etc.:

  • Option whether or not to list existence of private group/category publicly
  • Option whether or not to allow users to request to be added
3 « J'aime »

Out of curiousity, what page do you get if you click
https://meta.discourse.org/category/lounge

How does it make you feel, do you yearn or resent?

[quote=“Mittineague, post:3, topic:21135”]
Out of curiousity, what page do you get if you click
https://meta.discourse.org/category/lounge%5B/quote%5D
Here’s a screenshot:

I would say it depends on the context. In this case, it looks like something’s broken; I move on.

In the case I describe, we just want people to know the other category exists and that they can ask to have access.

1 « J'aime »

I’ve put together a plugin to address this. It’s not pretty but it does the job for the time being. Comments and PRs are super-welcome.

https://github.com/rilla/discourse-show-private-categories

5 « J'aime »

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 :wink:

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.

Hope that makes sense. Thanks for your comments!

4 « J'aime »

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.

3 « J'aime »

Did you find a solution for this @alehandrof?

Nope. We plan to list the groups on our site so that there’s a definitive list somewhere.

J’aimerais pouvoir lier mes catégories privées et que les gens puissent voir un message que j’ai écrit sur la façon de rejoindre la catégorie plutôt qu’un message d’erreur étrange !

2 « J'aime »

Jetez un coup d’œil à

3 « J'aime »

Ce Plugin pourrait fonctionner s’il est auto-hébergé

Changez l’URL en URL pour envoyer un message aux propriétaires du groupe demandant l’accès.

Sinon, un sujet avec des descriptions de catégories privées et un lien pour envoyer un message aux propriétaires demandant l’accès

1 « J'aime »

J’ai examiné ces deux solutions et elles ne correspondent pas vraiment à ce que je recherche.

Je veux juste que la page de catégorie par défaut dise quelque chose comme « Vous n’avez pas accès à cette catégorie » et que je puisse peut-être personnaliser ce message, plutôt que de devoir recréer des pages de catégorie qui n’existent pas ou ouvrir tous les sujets…

1 « J'aime »

Vous devrez peut-être alors envisager de publier dans Marketplace si vous avez un budget afin de voir ce qui peut être réalisé pour répondre à vos exigences.

Cela devrait être possible de changer le texte pour cela, je ne suis pas certain comment cela peut être fait mais je crois que la plupart des messages d’alerte par défaut peuvent être modifiés.

Ce serait bien d’avoir quelque chose de plus professionnel que la page « Oups ! Cette page n’existe pas ou est privée » introuvable, surtout que personne ne saura alors si la page existe ou non en fonction de cela.

Le texte par défaut peut être modifié, mais je suis à peu près sûr qu’il utilise la page 404 par défaut, qu’il n’y aurait aucun intérêt à modifier dans ce contexte.

1 « J'aime »

Vous pourriez activer le paramètre de site detailed-404, je crois qu’il s’applique aussi aux catégories je viens de vérifier, il ne s’applique pas aux catégories, seulement aux sujets malheureusement :

3 « J'aime »

Au-delà de la publication sur la page d’accueil, l’objectif est-il que si quelqu’un clique sur un lien vers un sujet dans une catégorie restreinte, l’avis lui indique comment y accéder ? Je ne suis pas sûr si l’alerte détaillée de 404 existante fonctionnerait pour cela ou comment cela fonctionne, donc si cela ne fonctionne pas, vous pourriez avoir besoin d’une nouvelle fonctionnalité.

Vous pourriez également utiliser une autre plateforme comme Patreon à la place si cela concerne un paywall pour les abonnés, cela fonctionne pour cela et peut être intégré à Discourse.

Je pense simplement qu’une erreur 404 est la mauvaise chose à afficher. Cela donne l’impression qu’il y a eu un lien brisé ou un problème quelque part. Rien n’indique que le lien pourrait fonctionner s’ils avaient des niveaux d’accès différents.