[data_release] Introduce Project Separation
Brief summary of changes
- Add project separation permissions for the data release module
- This makes it so that users do not see data_release files from different projects.
- If a data_release file does not have a projectID, then all users with access to that version/file can see it.
- Improved the manage permission form because it was not very user friendly
- Version and user options only show up as the ones that the current user has access to that project for
Testing instructions (if applicable)
- Open the data release module with a user with only access to one project (can change this in user accounts), as well as the
Data Release: Grant Other Users Access to Releases permission - Open the data release module and press Manage Permissions
- Confirm that users not in the project do not show up
- Try to save changes from manage permissions, then re-open and confirm it saved correctly. For instance, remove permission from release_x for bob, and then save it and open again and confirm bob does not have permission to release_x
Related to CCNR PR 7445
This is my review result on this PR. The steps that are checked mean they are passed.
-
[x] Open the data release module with a user with only access to one project (can change this in user accounts), as well as the
Data Release: Grant Other Users Access to Releases permission -
[x] Open the data release module and press Manage Permissions
-
[ ] Confirm that users not in the project do not show up
NB: User not in the same project show up
-
[x] Try to save changes from manage permissions, then re-open and confirm it saved correctly. For instance, remove permission from release_x for bob, and then save it and open again and confirm bob does not have permission to release_x
@shonibare sorry about that!
resolved, but make sure you compile because the manage permissions form should look like this, not the screenshot
@skarya22, you are right. I retested it again, and it produced the expected result. A user can not manage permissions or see files not affiliated with its site.