#667: bug in identity.Any
-----------------------+----------------------------------------------------
Reporter: anonymous | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone:
Component: Identity | Version:
Severity: major | Keywords:
-----------------------+----------------------------------------------------
There is a function with this decorator:
@identity.require (identity.Any(identity.has_permission('Admin'),
identity.has_permission('Teacher')))
If any of the criterias met, there is no problem, but to an
unprivileged user this message is dropped:
AttributeError: 'Any' object has no attribute 'error_message'
And it's true, identity.Any has no
error_message attribute, but append_error_message method needs one:
class Predicate(object):
[...]
def append_error_message( self, errors=None ):
if errors is None:
return
errors.append( self.error_message % self.__dict__ )
--
Ticket URL: <http://www.turbogears.org:7779/turbogears/ticket/667>
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
-~----------~----~----~----~------~----~------~--~---