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

Merged
merged 1 commit into from Jul 1, 2011

Conversation

Projects
None yet
3 participants
Contributor

wylee commented Jun 5, 2011

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

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

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

bbangert added a commit that referenced this pull request Jul 1, 2011

Merge pull request #2 from wylee/master
Patch for Issue #1 (allows view_permission to be passed to add_handler)

@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