We should do two things differently with the @vouch_required decorator: 1) Put it in something like phonebook.decorators. It doesn't need to live in phonebook.views. 2) The unvouched case should 'raise PermissionDenied', not return an HttpResponse subclass. That'll let the 403 handler catch it. Alternatively, we could subclass PermissionDenied: class VouchRequired(PermissionDenied): """A witty description.""" Then in a 403 handler view, do something slightly different for "you need a voucher" vs "you don't have permission to do that".
In bug 846039 we removed all related code. Marking this one invalid.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → INVALID
Resolving to verified invalid per comment 1.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.