Opened 16 years ago
Closed 14 years ago
#10360 closed (duplicate)
allow customized forbidden message when using exceptions
Reported by: | Rick Dean | Owned by: | |
---|---|---|---|
Component: | Core (Other) | Version: | 1.0 |
Severity: | Keywords: | ||
Cc: | Leo Shklovskii | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | yes |
Needs tests: | yes | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When using "raise PermissionDenied" it would be convenient to provide
a more detailed error message such as "raise PermissionDenied('<h1>
Forbidden</h1><p>This blah is owned by another user</p>')".
Attachments (1)
Change History (9)
by , 16 years ago
Attachment: | custom-forbidden-msg.diff added |
---|
comment:1 by , 16 years ago
milestone: | → 1.1 |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 16 years ago
Needs documentation: | set |
---|---|
Needs tests: | set |
Owner: | changed from | to
Status: | new → assigned |
comment:3 by , 16 years ago
milestone: | 1.1 → 1.2 |
---|
comment:4 by , 15 years ago
Cc: | added |
---|
Eric, I can do a patch & docs for this, but I'm not sure where to document it. PermissionDenied isn't documented anywhere atm and I'm not sure where the right place would be.
comment:5 by , 15 years ago
Actually, even better behavior would be to redirect to a 403.html page just like the 500 and 404 handlers that currently exist. Some more discussion in #5515.
comment:6 by , 15 years ago
Owner: | removed |
---|---|
Status: | assigned → new |
comment:7 by , 15 years ago
milestone: | 1.2 |
---|
1.2 is feature-frozen, moving this feature request off the milestone.
comment:8 by , 14 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
This is essentially a duplicate of #9847, so let's keep the conversation going there.
This patch needs tests. It should be pretty simple.
It should probably also be documented.