Hello,

I'm using @require decorator on my controller functions and it works fine. But now I need to use predicates inside a controller function. in the function, I have a condition based on permissions and do something else based on the permission.

I tried this :

p =  predicates.has_permission('somepermission')

if p:
     do something
else:
    do something else

how can I do this ? is there any example code? I've read the docs and I've only seen using with @require decorator.

I've searched the google and found only documents and examples using predicates with @require. So, I've decided to ask here.



--
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.

Reply via email to