#1131: [Patch] identity.SecureResource not catching IdentityExceptions properly
--------------------------+-------------------------------------------------
Reporter: PeterRussell | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 1.0b2
Component: Identity | Version: 1.0b1
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
Throwing an identity.IdentityException inside a
controller method is not caught by identity.SecureResource, as described
in the Documentation
(http://docs.turbogears.org/1.0/IdentityManagment ).
Attached are two patches, one to the tests, which adds a few new tests,
one of which fails, illustrating the problem, the other is to secure
resource, which fixes the problem.
The second of these I'm not quite sure about. It seems the problem is
that the original author expected IdentityExceptions in the wrapped
methods to propogate to the SecureResource _getattribute_ method, but it
won't since the wrapped method is returned into a different scope. There
are therefore probably unnecessary try, except blocks, which this patch
does not remove. Someone who understands Identity should have a careful
look before applying this patch.
--
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/1131>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Tickets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets
-~----------~----~----~----~------~----~------~--~---