On Wed, 2011-07-13 at 21:20 +0200, Pierre GIRAUD wrote: > It looks like I cannot set a permission to a view added for the > Forbidden context. > > config.add_view('tutorial.login.login', > renderer='tutorial:templates/login.pt', > context='pyramid.exceptions.Forbidden', > permission='view') > > Even if the corresponding __acl__ is : > [ (Allow, Everyone, 'view') ] > > I get the following kind of error: > HTTPForbidden: Unauthorized: <function login at 0x951133c> failed > permission check > > I could easily live without any permission for that view, but I get > the same error if I set a default_permission at the config level which > is a bit more annoying. > > Did I do something wrong ?
Use debug_authorization = true in the configuration file; it will print authorization debug messages to stdout including the reason the view execution was denied. See also http://docs.pylonsproject.org/projects/pyramid/1.1/narr/environment.html#debugging-authorization - C -- You received this message because you are subscribed to the Google Groups "pylons-devel" group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.