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


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 15 years ago.

Download all attachments as: .zip

Change History (9)

Changed 15 years ago by Rick Dean

Attachment: custom-forbidden-msg.diff added

comment:1 Changed 15 years ago by Jacob

milestone: 1.1
Triage Stage: UnreviewedAccepted

comment:2 Changed 15 years ago by Eric Holscher

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 Changed 15 years ago by Jacob

milestone: 1.11.2

comment:4 Changed 14 years ago by Leo Shklovskii

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 Leo Shklovskii

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 Eric Holscher

Owner: Eric Holscher deleted
Status: assignednew

comment:7 Changed 14 years ago by James Bennett

milestone: 1.2

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

comment:8 Changed 13 years ago by Steven L Smith

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