Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ralph's views permissions review and fixes. #980

Closed
wants to merge 3 commits into from
Closed

Ralph's views permissions review and fixes. #980

wants to merge 3 commits into from

Conversation

xor-xor
Copy link
Contributor

@xor-xor xor-xor commented Jul 17, 2014

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.

'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) - both of them are for enforcing permissions
checks. 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.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.08%) when pulling a29152b on xor-xor:ralph_permissions into 0c802f8 on allegro:develop.

@xor-xor xor-xor closed this Jul 18, 2014
@xor-xor xor-xor deleted the ralph_permissions branch July 18, 2014 08:51
@coveralls
Copy link

Coverage Status

Coverage increased (+0.08%) when pulling ebc6590 on xor-xor:ralph_permissions into 78ec020 on allegro:develop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants