I have found that i can use this in a template:
<p py:if="tg.predicates.has_permission( page.permission )">Has full
control</p>

But the problem is, that it doesn't parse the var page.permission :S
When i do:
<p py:if="tg.predicates.has_permission( 'sec_page' )">Has full
control</p>
I get the Has full control line.
But when i use page.permission (which contains sec_page), it doesn't
work.
Anyone has an idea why this is happening?

On Jul 23, 9:39 am, bloeper <[email protected]> wrote:
> Ok but if that's the case, can you just do something like:
> identity.has_perm(perm_id); ?
> Or do I need some other stuff in there?
>
> On Jul 22, 9:42 pm, NiL <[email protected]> wrote:
>
> > just a pointer
>
> > the user is known as identity in the template
>
> > see lib/base.py
>
> > or maybe list permissions in some helper ?

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