--- a/selectors.py Wed Feb 18 10:03:58 2009 +0100
+++ b/selectors.py Wed Feb 18 10:05:15 2009 +0100
@@ -347,7 +347,7 @@
@lltrace
def authenticated_user(cls, req, *args, **kwargs):
"""accept if user is authenticated"""
- return not anonymous_user(cls, req, *args, **kwargs)
+ return not anonymous_user()(cls, req, *args, **kwargs)
@objectify_selector
@lltrace
--- a/vregistry.py Wed Feb 18 10:03:58 2009 +0100
+++ b/vregistry.py Wed Feb 18 10:05:15 2009 +0100
@@ -693,7 +693,9 @@
will be the sum of each selector'score
"""
assert selectors
- selector = AndSelector(*selectors)
+ # XXX do we need to create the AndSelector here, a tuple might be enough
+ selector = AndSelector(*[_instantiate_selector(selector)
+ for selector in selectors])
if 'name' in kwargs:
selector.__name__ = kwargs['name']
return selector
@@ -704,7 +706,8 @@
will be the first non-zero selector score
"""
assert selectors
- selector = OrSelector(*selectors)
+ selector = OrSelector(*[_instantiate_selector(selector)
+ for selector in selectors])
if 'name' in kwargs:
selector.__name__ = kwargs['name']
return selector