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. #986

Merged
merged 3 commits into from
Jul 18, 2014
Merged

Ralph's views permissions review and fixes. #986

merged 3 commits into from
Jul 18, 2014

Conversation

xor-xor
Copy link
Contributor

@xor-xor xor-xor commented Jul 18, 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.

Tomasz Mieszkowski added 2 commits July 18, 2014 11:11
'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.09%) when pulling 2cea9b1 on xor-xor:permissions into 78ec020 on allegro:develop.

andrzej-jankowski added a commit that referenced this pull request Jul 18, 2014
Ralph's views permissions review and fixes.
@andrzej-jankowski andrzej-jankowski merged commit 5bc9770 into allegro:develop Jul 18, 2014
@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) when pulling b412119 on xor-xor: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.

3 participants