What's the better way to check permissions, groups or auth inside a mako
template, for example, to show only part of the web page based on the
user accessing it.
Now, I'm using something like this:
class MyController(BaseController):
def index(self):
c.is_manager = in_group('manager').is_met(request.environ)
return render('/index.mako')
In the index.mako template:
...
%if c.is_manager:
<p>Hello manager</p>
...
Is there a direct way of doing this?
Greetings.
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en.