-
Notifications
You must be signed in to change notification settings - Fork 81
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
Fix #961 -- Move view detail permissions into project user policy #1071
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a couple of requests.
@@ -4,5 +4,35 @@ | |||
// additional permissions over those given to all users. This may | |||
// change in the future. In particular, project users may be | |||
// permitted access to projects that are normally private. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is no longer correct ("...no additional permissions...").
@@ -84,8 +84,27 @@ def test_get_from_non_existent_project(self): | |||
def test_get_with_unauthorized_user(self): | |||
user = UserFactory.create() | |||
response = self.request(user=user) | |||
assert response.status_code == 302 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add another assertion for the redirect URL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't necessary.
The redirect URL is based on the referrer and it is defined in core.mixins.PermissionRequiredMixin.handle_no_permission
, which has appropriate tests.
b264c86
to
3a83fb0
Compare
6b5d7b2
to
9ca5e01
Compare
The updated changes are OK. |
9ca5e01
to
5be9fcc
Compare
5be9fcc
to
878b32e
Compare
Proposed changes in this pull request
view
permissions for all entities into the project user policy description. Organisation members will not be able to view details for locations, relationships, parties and resources for any of the organisation's projects; unless they are a member of the project.PartiesList
to make it consistent with locations listing: All parties are listed, not taking into account whether the user can view details or not.When should this PR be merged
Anytime
Risks
None
Follow up actions
Permissions policies need to be reloaded when deploying (/cc @amplifi)
Checklist (for reviewing)
General
migration
label if a new migration is added.Is the risk level assessment sufficient? The risks section should contain all risks that might be introduced with the PR and which actions we need to take to mitigate these risks. Possible risks are database migrations, new libraries that need to be installed or changes to deployment scripts.
Functionality
Code
Tests
Documentation