| Simon, I've been trying to add this feature and it doesn't seem to work correctly. The require decorator is presently defined as: def require(predicate, obj=None): ''' Function decorator that checks whether the current user is a member of the groups specified and has the permissions required. ''' def entangle(fn): def require(func, self, *args, **kwargs): try: errors= [] if predicate is None or \ predicate.eval_with_object(current, errors): return fn(self, *args, **kwargs) except IdentityException, e: errors= [str(e)] raise IdentityFailure(errors) return decorator(require)(fn) return entangle I've tried adding a _require attribute to entangle or the internal require, but in neither case is it visible as part of the decorated method. The magic seems to have failed. Any idea what I might be doing wrong? On 18 Feb, 2006, at 5:38 am, Simon Belak wrote:
|
- [TurboGears] Re: Identity Introspection Jeff Watkins
- [TurboGears] Re: Identity Introspection Simon Belak
- [TurboGears] Re: Identity Introspection Jeff Watkins
- [TurboGears] Re: Identity Introspection Simon Belak
- [TurboGears] Re: Identity Introspection Jeff Watkins

