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.
For more options, visit this group at 
http://groups.google.com/group/pylons-devel?hl=en.

Reply via email to