Closed Bug 747453 Opened 12 years ago Closed 11 years ago

Move and slight refactor @vouch_required

Categories

(Participation Infrastructure :: Phonebook, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED INVALID

People

(Reporter: jsocol, Unassigned)

Details

(Whiteboard: [qa-])

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
Closed: 11 years ago
Resolution: --- → INVALID
Whiteboard: [qa-]
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.