Found the problem, needed to use page.permission.permission_name..
Was a bit of a dumb mistake, but fixed now :)

On Jul 23, 7:51 pm, bloeper <[email protected]> wrote:
> 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