Opened 8 years ago

Closed 6 years ago

#10360 closed (duplicate)

allow customized forbidden message when using exceptions

Reported by: tallfred Owned by:
Component: Core (Other) Version: 1.0
Severity: Keywords:
Cc: Leo Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: no
Easy pickings: UI/UX:


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 tallfred 8 years ago.

Download all attachments as: .zip

Change History (9)

Changed 8 years ago by tallfred

comment:1 Changed 8 years ago by jacob

  • milestone set to 1.1
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 7 years ago by ericholscher

  • Needs documentation set
  • Needs tests set
  • Owner changed from nobody to ericholscher
  • Status changed from new to assigned

This patch needs tests. It should be pretty simple.

It should probably also be documented.

comment:3 Changed 7 years ago by jacob

  • milestone changed from 1.1 to 1.2

comment:4 Changed 7 years ago by Leo

  • Cc Leo 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 7 years ago by Leo

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 7 years ago by ericholscher

  • Owner ericholscher deleted
  • Status changed from assigned to new

comment:7 Changed 7 years ago by ubernostrum

  • milestone 1.2 deleted

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

comment:8 Changed 6 years ago by fvox13

  • Resolution set to duplicate
  • Status changed from new to closed

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