Pylons / pyramid_handlers

Pyramid "handlers" emulate Pylons 1 "controllers"
Other
8 stars 9 forks source link

Patch for Issue #1 (allows view_permission to be passed to add_handler) #2

Closed wylee closed 13 years ago

wylee commented 13 years ago

If view_permission (or its alias, permission) is passed to add_handler(), it will be used as the default permission for all views registered via the handler. Handler views can override this default permission via the action decorator.

Added two tests to exercise this new functionality on both types of add_handler() calls--i.e., with '{action}' in route path and with action as a keyword arg.

References: https://github.com/Pylons/pyramid_handlers/issues/1

tomivirkkula commented 13 years ago

Adding a default permission for a Handler was the first thing I tried to do. Works great! Someone merge this.