Is there anyway to check if the user have the required permissions
when I only know the route_name?

def main(global_config, **settings):
        [snip]
        config.add_route('administrations', '/administrations')

class Administration(object):
        def __init__(self, request):
                self.request = request

        @view_config(route_name = 'administrations',
                     renderer='administration.mako',
                     permission='admin)
        def admin(self):
                return {'name':'test'}

I tried view_execution_permitted(self.request.context, self.request,
view_name) but since I am using URL dispatch my views don't have any
view_names so that functions always return a Allowed() instance.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to