Thank you -- that part is working now! One last question that I couldn't find an answer for:
What is the add_handler/@action equivalent of this add_view from the wiki tutorial? config.add_view('webapp.auth.login', renderer='webapp:templates/login.mako', context='pyramid.exceptions.Forbidden') To get it working correctly with the above code, I needed to add a function to auth.py that calls the appropriate class method: def login(request): return Auth(request).login() I know there must be a cleaner way to do it. Also, if I'm missing a section in the docs on using Pylons-style handlers with authentication, please let me know. On Sat, Nov 20, 2010 at 3:04 PM, Ben Bangert <b...@groovie.org> wrote: > On Nov 20, 2010, at 2:21 AM, Eric Rasmussen wrote: > > > I completed the wiki tutorial and had no problem setting up > authorization/authentication with config.add_route and the keyword argument > view_permission. However, I'm putting together my own app now using the > Pylons style handlers, and it doesn't seem to act on the permission setting > (although I'm not receiving any errors): > > > > config.add_handler('console', '/console/', > 'webapp.handlers:MyHandler', action='console', permission='edit') > > > > I've also tried the above with view_permission='edit', and I've tried > using each of those keyword arguments in the @action decorator in my > handlers.py file/'console' action as well. > > The permission keyword should work fine in the @action decorator, it won't > work in the add_handler call because all additional keyword args to > add_handler go to add_route (and permission is something you want for the > add_view which @action will use). > > Cheers, > Ben > > -- > You received this message because you are subscribed to the Google Groups > "pylons-devel" group. > To post to this group, send email to pylons-de...@googlegroups.com. > To unsubscribe from this group, send email to > pylons-devel+unsubscr...@googlegroups.com<pylons-devel%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/pylons-devel?hl=en. > > -- You received this message because you are subscribed to the Google Groups "pylons-devel" group. To post to this group, send email to pylons-de...@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.