On Tuesday 30 June 2009 09:05:33 am Kirk Strauser wrote:
> I'm building a navigation system and only want to show actions that a user
> is authorized to access. I've been digging around for that documentation
> but can't seem to find it and would appreciate a pointer.
>
> BTW, does such a navigation system already exist? Surely so; I'm confident
> I'm not the first person wanting to do this. :-)
Replying to myself for the sake of other readers.
To see if the user has access to a controller:
try:
MyController()._check_security()
except webob.exc.HTTPUnauthorized:
print 'No access'
I still have no idea how to check if they have access to an action, but I'll
put back if/when I figure it out.
--
Kirk Strauser
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---