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

Fix resource policy type not set for bitstreams when importing items #9296

Merged
merged 1 commit into from May 1, 2024

Conversation

amgciadev
Copy link
Contributor

Fix resource policy type not set for bitstreams when importing items as reported in #9290 - which causes conflicts if later on policies are set via the Access control functionality.

References

Description

Simple fix to set rptype to TYPE_SUBMISSION if workflow is enabled; TYPE_INHERITED otherwise if items are archived upon import directly.

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & integration tests). Exceptions may be made if previously agreed upon.
  • My PR passes Checkstyle validation based on the Code Style Guide.
  • My PR includes Javadoc for all new (or modified) public methods and classes. It also includes Javadoc for large or complex private methods.
  • My PR passes all tests and includes new/updated Unit or Integration Tests based on the Code Testing Guide.
  • If my PR includes new libraries/dependencies (in any pom.xml), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR modifies REST API endpoints, I've opened a separate REST Contract PR related to this change.
  • If my PR includes new configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

expand setPermission to take the rpType string
@tdonohue tdonohue added bug 1 APPROVAL pull request only requires a single approval to merge. authorization Related to user authorization / permissions port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release labels Jan 29, 2024
@tdonohue tdonohue self-requested a review April 11, 2024 14:51
Copy link
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

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

👍 Thanks @amgciadev ! I was finally able to get to testing this. I found that this bug is ONLY reproducible if the SAF package specifies its own permissions in the contents file via something like this: permissions:-r 'Anonymous'

However, once I specific the permissions in the contents file, I'm able to reproduce the bug & I've found this PR fixes it.

@tdonohue tdonohue added this to the 8.0 milestone May 1, 2024
@tdonohue tdonohue merged commit 7952df1 into DSpace:main May 1, 2024
22 checks passed
@dspace-bot
Copy link

Successfully created backport PR for dspace-7_x:

@tdonohue tdonohue removed the port to dspace-7_x This PR needs to be ported to `dspace-7_x` branch for next bug-fix release label May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 APPROVAL pull request only requires a single approval to merge. authorization Related to user authorization / permissions bug
Projects
Status: ✅ Done
3 participants