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)

custom-forbidden-msg.diff (852 bytes ) - added by Rick Dean 16 years ago.

Download all attachments as: .zip

Change History (9)

by Rick Dean, 16 years ago

Attachment: custom-forbidden-msg.diff added

comment:1 by Jacob, 16 years ago

milestone: 1.1
Triage Stage: UnreviewedAccepted

comment:2 by Eric Holscher, 16 years ago

Needs documentation: set
Needs tests: set
Owner: changed from nobody to Eric Holscher
Status: newassigned

This patch needs tests. It should be pretty simple.

It should probably also be documented.

comment:3 by Jacob, 16 years ago

milestone: 1.11.2

comment:4 by Leo Shklovskii, 15 years ago

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 by Leo Shklovskii, 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 Eric Holscher, 15 years ago

Owner: Eric Holscher removed
Status: assignednew

comment:7 by James Bennett, 15 years ago

milestone: 1.2

1.2 is feature-frozen, moving this feature request off the milestone.

comment:8 by Steven L Smith, 14 years ago

Resolution: duplicate
Status: newclosed

This is essentially a duplicate of #9847, so let's keep the conversation going there.

Note: See TracTickets for help on using tickets.
Back to Top