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.
Me gustaría poder enlazar a mis categorías privadas y que la gente pueda ver un mensaje que escribí sobre cómo unirse a la categoría en lugar de un mensaje de error extraño.
He mirado ambas soluciones y no son realmente lo que busco.
Solo quiero que la página de categoría predeterminada diga algo como “No tienes acceso a esta categoría” y tal vez me permita personalizar lo que dice, no tener que recrear páginas de categoría que no existen o abrir todos los temas…
Es posible que entonces necesites considerar publicar en Marketplace si tienes un presupuesto para ver qué se puede lograr para cumplir con tus requisitos.
Debería ser posible cambiar el texto de eso, no estoy seguro de cómo se puede hacer, pero creo que la mayoría de las alertas de texto predeterminadas se pueden editar.
Sería bueno tener algo más profesional que la página “¡Oops! Esa página no existe o es privada” de página no encontrada, especialmente porque así nadie sabrá si la página existe o no basándose en eso.
El texto predeterminado se puede cambiar, pero estoy bastante seguro de que utiliza la página 404 predeterminada, que no tendría sentido editar en este contexto.
Podrías habilitar la configuración del sitio detailed-404, creo que también se aplica a las categorías acabo de comprobarlo, no se aplica a las categorías, solo a los temas, lamentablemente:
Más allá de publicar eso en la página de inicio, ¿el objetivo es que si alguien hace clic en el enlace a un tema en una categoría restringida, el aviso le dirá cómo obtener acceso a él? No estoy seguro de si la alerta detallada de error 404 existente funcionaría para eso o cómo funciona, así que si eso no funciona, es posible que necesites una nueva función.
También podrías usar una plataforma diferente como Patreon en su lugar si esto es para un muro de pago para suscriptores que funcione para eso y se pueda integrar con Discourse.
Creo que un error 404 es lo incorrecto para mostrar. Parece que hubo un enlace roto o un problema en alguna parte. No hay indicación de que el enlace pueda funcionar si tuvieran diferentes niveles de acceso.