Hello,

I have 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 yes, if you check the source code, 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__ )

Should I open a ticket for this?


Gergely MAJOR


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" 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-trunk
-~----------~----~----~----~------~----~------~--~---

Reply via email to