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

Merged
merged 1 commit into from Jul 1, 2011

Projects

None yet

3 participants

@wylee

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: #1

@wylee wylee Allow `view_permission` keyword arg to be passed to `add_handler()`.
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: Pylons#1
ed710e8
@tomivirkkula

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

@bbangert bbangert merged commit 88a04f4 into Pylons:master Jul 1, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment