Kevin Dangoor wrote:
There needs to be a way to query the identity system for whether a
user has a given permission (probably in a context, but I haven't seen
any mentions of context). There may be a mechanism now to do so, but I
can't point you on the right path yet. (I changed the subject so maybe
Jeff will notice.)

I notice everything (really, I at least scan all the emails on this list)... but that said, there *is* a solution to this question.

You can always check whether a user has a particular permission with code similar to the following:

import identity from turbogears

if 'view-images' in identity.current.permissions:
    pass
else:
    pass

Now, I imagine you can plug this into Kid somehow. Most of my apps are all Ajaxy so I don't really use much in the template land.

--
Jeff Watkins
http://newburyportion.com/

Reply via email to