allegro/ralph — pull request #980 by xor-xor (2014-07-17 07:10:11+00:00)
Title: Ralph's views permissions review and fixes.

Added `ACLGateway` class which enforces permissions checks (via `ralph_permission` decorator on `dispatch` metod) and which should be present in `mro` path of every class-based view.

Fixed `ralph_permission` decorator and added `decorated_with` property to it (for faciliating unit tests).

Applied `ralph_permission` decorator to the function-based views.

Added test checking if every view inherits from `ACLGateway` class (for class-based views) or is decorated with `ralph_permission` decorator (for function-based views). This test includes a list of excluded callbacks and callbacks decorated manually (i.e. not inheriting from `ACLGateway` class) - for the explaination see the comments in the source code.