Opened 15 years ago
Closed 13 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)
Changed 15 years ago by
Attachment: | custom-forbidden-msg.diff added |
---|
comment:1 Changed 15 years ago by
milestone: | → 1.1 |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 Changed 15 years ago by
Needs documentation: | set |
---|---|
Needs tests: | set |
Owner: | changed from nobody to Eric Holscher |
Status: | new → assigned |
comment:3 Changed 15 years ago by
milestone: | 1.1 → 1.2 |
---|
comment:4 Changed 14 years ago by
Cc: | Leo Shklovskii 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 Changed 14 years ago by
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 Changed 14 years ago by
Owner: | Eric Holscher deleted |
---|---|
Status: | assigned → new |
comment:7 Changed 14 years ago by
milestone: | 1.2 |
---|
1.2 is feature-frozen, moving this feature request off the milestone.
comment:8 Changed 13 years ago by
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.