Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #667 (closed defect: fixed)

Opened 11 years ago

Last modified 10 years ago

bug in identity.Any

Reported by: anonymous Owned by: anonymous
Priority: normal Milestone: 0.9a3
Component: Identity Version:
Severity: major Keywords:
Cc: jeff

Description

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 )

Change History

comment:1 Changed 11 years ago by anonymous

  • Cc jeff added

comment:2 Changed 11 years ago by Jeff Watkins

  • Status changed from new to closed
  • Resolution set to fixed

I guess I didn't consider someone using Any by itself. Kind of stupid of me... fixed in r1037.

comment:3 Changed 11 years ago by kevin

  • Milestone set to 0.9a3
Note: See TracTickets for help on using tickets.