leog
(Leo Giovanetti)
13. August 2019 um 01:43
1
Hallo!
Ich habe mich gefragt, ob jemand eine Idee hat, wie man eine benutzerdefinierte Fehlerseite für eine aufgrund von Gruppenberechtigungen unzugängliche Kategorie erstellen kann.
Hintergrund: Damit das Voting-Plugin nur von bestimmten Personen genutzt werden kann, wurde eine Gruppe erstellt. Leider können alle, die nicht in dieser Gruppe sind, diese Kategorie nicht einmal sehen, da die Berechtigung „Anzeigen
Das wurde bereits hier diskutiert:
I think this is a great idea. For many kinds of forums identifying that something is there is not a security hole and would really improve accessibility.
The challenge here is really naming the site setting properly and explaining what it does. I’ve done my best below but would not be against edits.
Here’s a mini spec:
Add a new site setting detailed_404, default false. “Provides more details to users about why they can’t access a particular topic. NOTE: This is less secure because users wi…
@dan , steht das immer noch auf deiner langfristigen To-Do-Liste?
dan
(Dan Ungureanu)
16. Oktober 2019 um 10:42
4
Es gibt eine neue Site-Einstellung, detailed_404, die dies steuert. Wenn sie aktiviert ist, wird versucht, weitere Informationen über den Fehler bereitzustellen (z. B. welche Gruppe das Thema oder die Kategorie sehen kann).
master ← udan11:detailed_404
merged 11:15AM - 08 Oct 19 UTC
If the setting is turned on, then the user will receive information
about the s… ubject: if it was deleted or requieres some special access to
a group (only if the group is public). Otherwise, the user will receive
a generic #404 error message. For now, this change affects only the
topics and categories controller.
This commit also tries to refactor some of the code related to error
handling. To make error pages more consistent (design-wise), the actual
error page will be rendered server-side.
---
### Preview
* Topic in a secret category (with public group)
<img width="1135" alt="topic in secret category" src="https://user-images.githubusercontent.com/4147664/63161475-d9fd6d00-c028-11e9-8e0a-6c8595d73c32.png">
* Deleted topic in a public category (with public group)
<img width="1135" alt="a deleted topic" src="https://user-images.githubusercontent.com/4147664/63161465-d538b900-c028-11e9-88b9-0587fc763645.png">
* Deleted topic in a secret category
<img width="1135" alt="deleted topic in secret category" src="https://user-images.githubusercontent.com/4147664/63161491-e2ee3e80-c028-11e9-83a8-39bb46494069.png">
* Topic in a secret category (with private group)
<img width="1135" alt="topic in super secret category" src="https://user-images.githubusercontent.com/4147664/63161500-e8e41f80-c028-11e9-8a98-ca3534288849.png">
* Secret category (with a public group)
<img width="1135" alt="category page" src="https://user-images.githubusercontent.com/4147664/63161513-ee416a00-c028-11e9-87ef-45943576dbaa.png">