-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[Port to dspace-7_x] Enforce resource policies to have group or eperson #9191
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
[Port to dspace-7_x] Enforce resource policies to have group or eperson #9191
Conversation
|
@YanaDePauw : This is currently failing tests & appears to have compilation errors. I suspect the new code refactors have not been applied everywhere in the codebase |
|
@tdonohue Is it possible that there is some caching happening for the code? The reported compile issue does not actually occur in the code. Furthermore the forked branch does not seem to have this issue. |
|
@YanaDePauw : I don't believe we have any code caching. However, it is possible the branch this PR is based on is now slightly outdated. We've merged a lot of code changes in the last 48 hours as we are heading into the 7.6.1 release next week. So, when CI runs this PR, it might be trying to run it against the latest code on So, the build failures here might be a sign of a "code conflict" between this PR and some recent change on UPDATE: In case the details above aren't clear...the best solution would be to try to rebase this PR against the latest code on |
…force-resource-policies-to-have-group-or-eperson
|
@tdonohue There was indeed an issue with a test that was added on |
|
@YanaDePauw : Thanks for the update! One quick question about this PR: I notice there's no script to cleanup existing resources policies that have no group or eperson. Should that be part of the new Flyway migration here? Otherwise, I'm worried this change may cause sites to throw errors if they have these invalid policies in their databases. |
|
@tdonohue I added a line to the sql file to remove any faulty resource policies |
|
@YanaDePauw is there a main port of this work yet? (at 43 changed files i am thinking it might not be super straightforward) |
|
@YanaDePauw : Would you have time to update this based on the latest code on I tried to install this into |
|
@tdonohue I'll look into this, this week. |
…force-resource-policies-to-have-group-or-eperson
tdonohue
left a comment
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.
👍 Verified this is identical to #9502 (8.x version) and tested this on 8.x. This is ready to merge as soon as #9502 is cleaned up (see comments on that PR)
|
Hi @YanaDePauw, |
…force-resource-policies-to-have-group-or-eperson
…e-policies-to-have-group-or-eperson [Port to dspace-7_x] Enforce resource policies to have group or eperson
* Sync a few dependency exclusions from dspace-8_x to dspace-7_x to fix convergence issues * Merge pull request DSpace#10306 from DSpace/dependabot/maven/dspace-7_x/net.minidev-json-smart-2.5.1 Bump net.minidev:json-smart from 2.5.0 to 2.5.1 * Merge pull request DSpace#9520 from DSpace/backport-9296-to-dspace-7_x [Port dspace-7_x] Fix resource policy type not set for bitstreams when importing items * Added removed resource policies when adding bitstreams in the AbstractMETSIngester * Merge pull request DSpace#9596 from paulo-graca/bugfixes/issue-7464 Fixing issue DSpace#7464 for DSpace 7 * Merge pull request DSpace#9191 from atmire/w2p-106812_enforce-resource-policies-to-have-group-or-eperson [Port to dspace-7_x] Enforce resource policies to have group or eperson * Fixed Tests following the Resource Policy refactoring * Merge pull request DSpace#9364 from DSpace/backport-9336-to-dspace-7_x [Port dspace-7_x] Add more SWORDv2 Integration Tests * Added test to depositItemWithEmbargo when the user is in the submitter group * Throw a proper exception with more info when Authorization or Crosswalk exception instead of RuntimeException. * Update all GitHub Actions. Add newly required CODECOV_TOKEN to codecov action * Revert unwanted change * Removed mets-embargo.xml because it is not used --------- Co-authored-by: Tim Donohue <[email protected]>
* Sync a few dependency exclusions from dspace-8_x to dspace-7_x to fix convergence issues * Merge pull request DSpace#10306 from DSpace/dependabot/maven/dspace-7_x/net.minidev-json-smart-2.5.1 Bump net.minidev:json-smart from 2.5.0 to 2.5.1 * Merge pull request DSpace#9520 from DSpace/backport-9296-to-dspace-7_x [Port dspace-7_x] Fix resource policy type not set for bitstreams when importing items * Added removed resource policies when adding bitstreams in the AbstractMETSIngester * Merge pull request DSpace#9596 from paulo-graca/bugfixes/issue-7464 Fixing issue DSpace#7464 for DSpace 7 * Merge pull request DSpace#9191 from atmire/w2p-106812_enforce-resource-policies-to-have-group-or-eperson [Port to dspace-7_x] Enforce resource policies to have group or eperson * Fixed Tests following the Resource Policy refactoring * Merge pull request DSpace#9364 from DSpace/backport-9336-to-dspace-7_x [Port dspace-7_x] Add more SWORDv2 Integration Tests * Added test to depositItemWithEmbargo when the user is in the submitter group * Throw a proper exception with more info when Authorization or Crosswalk exception instead of RuntimeException. * Update all GitHub Actions. Add newly required CODECOV_TOKEN to codecov action * Revert unwanted change * Removed mets-embargo.xml because it is not used --------- Co-authored-by: Tim Donohue <[email protected]>
References
Description
The DSpace code currently does not enforce that a created resource policy has either a connected group or eperson.
As a consequence, it can happen that a resource policy is created with neither.
This will then cause issues down the line where DSpace assumes that all resource policies have either a group or eperson connected to it.
Instructions for Reviewers
Verify that it is no longer possible to create a resource policy without a group or eperson.
Checklist
pom.xml), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.