leog
(Leo Giovanetti)
13 Agosto 2019, 1:43am
1
Hello!
I was wondering if anyone had any clue how could I create a custom error page for an inaccessible category due to group permission.
Background: in order to have the voting plugin only used by certain people, a group was created. Unfortunately in order to have only that group of people voting capabilities, anyone outside it can’t even see that category due to the fact “View” access let’s a user vote as well. When anyone outside the group bumps into the inaccessible category (and not exactly by chance I should add) I would like to explain how they can join that group to be able to vote.
Thanks a lot in advance!
1 Mi Piace
This is already discussed here
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 this is still on your eventual todo list?
7 Mi Piace
dan
(Dan Ungureanu)
16 Ottobre 2019, 10:42am
4
There is a new site setting, detailed_404, that controls this. When enabled, it will try to provide more information about the error (ie which group can see the topic / category).
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">
3 Mi Piace