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

[data_release] Introduce Project Separation #9385

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

skarya22
Copy link
Contributor

@skarya22 skarya22 commented Oct 2, 2024

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)

  1. 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
  2. Open the data release module and press Manage Permissions
  3. Confirm that users not in the project do not show up
  4. 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

@skarya22 skarya22 added Needs Work PR awaiting additional changes by the author or contains issues that the author needs to fix Priority: Projects PR or issue is a priority for at least one project and should be a higher priority for LORIS labels Oct 2, 2024
@skarya22 skarya22 self-assigned this Oct 2, 2024
@skarya22 skarya22 removed the Needs Work PR awaiting additional changes by the author or contains issues that the author needs to fix label Oct 3, 2024
@skarya22 skarya22 marked this pull request as ready for review October 3, 2024 18:35
@skarya22 skarya22 removed their assignment Oct 7, 2024
@shonibare
Copy link
Contributor

This is my review result on this PR. The steps that are checked mean they are passed.

  • 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
Screenshot 2024-10-09 at 10 13 22 AM Screenshot 2024-10-09 at 10 12 47 AM NB: User not in the same project 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

@skarya22
Copy link
Contributor Author

@shonibare sorry about that!

resolved, but make sure you compile because the manage permissions form should look like this, not the screenshot
image

@shonibare
Copy link
Contributor

@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.

Copy link
Contributor

@shonibare shonibare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Projects PR or issue is a priority for at least one project and should be a higher priority for LORIS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants