I've ran into some trouble with the predicates as well
what is your exact version of repoze.what ?
your user/group permission attribute, is a real attribute or a
@property decorated method ?
To find my content id in my predicate, I use something like :
...
import re
ID_RE = re.compile('\d+')
...
def evaluate(self, environ, credentials):
try:
current_user = environ['repoze.who.identity']['user']
except KeyError: # anonymous
self.unmet()
url = environ['pylons.routes_dict']['url']
obj_id = ID_RE.findall(url)[0]
context_object = self.klass.get(obj_id)
if context_object is None:
raise HTTPNotFound
if context_object.has_permission
HTH
NIL
--
You received this message because you are subscribed to the Google Groups
"TurboGears" 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?hl=en.