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

[DS-3951] Send Request Copy email to multiple recipients, and some new recipient strategies #2115

Merged
merged 12 commits into from Sep 15, 2022

Conversation

mwoodiupui
Copy link
Member

@mwoodiupui mwoodiupui commented Jul 12, 2018

Fixes #7298
https://jira.duraspace.org/browse/DS-3951

Recipient strategy classes now return a List rather than a single recipient.

The CombiningRequestItemStrategy composes a list of recipients from the outputs of other strategies, as configured by Spring.

Checklist

  • 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, third-party 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 the REST API, I've linked to the REST Contract page (or open PR) related to this change.

@mwoodiupui mwoodiupui added improvement new feature work in progress PR is still being worked on & is not currently ready for review labels Jul 12, 2018
@mwoodiupui mwoodiupui added this to the 7.0 milestone Jul 12, 2018
@tdonohue tdonohue added authorization Related to user authorization / permissions backend: email-system Related to emails sent from DSpace labels Aug 21, 2018
…list collection administrators and to combine other strategies.
@mwoodiupui
Copy link
Member Author

Rebased to cure recent merge conflict.

@mwoodiupui mwoodiupui removed the work in progress PR is still being worked on & is not currently ready for review label Dec 5, 2018
@mwoodiupui mwoodiupui changed the base branch from master to main July 14, 2020 13:48
@mwoodiupui mwoodiupui closed this Aug 4, 2020
@mwoodiupui
Copy link
Member Author

Close/open to get Travis to run.

@mwoodiupui mwoodiupui reopened this Aug 4, 2020
@github-actions github-actions bot added the merge conflict PR has a merge conflict that needs resolution label Oct 8, 2020
@mwoodiupui mwoodiupui removed the merge conflict PR has a merge conflict that needs resolution label Mar 13, 2021
@mwoodiupui mwoodiupui removed this from the 7.0 milestone Mar 14, 2021
@mwoodiupui mwoodiupui added the needs triage New issue needs triage and/or scheduling label Mar 14, 2021
@mwoodiupui
Copy link
Member Author

Close/open to jog tests.

@mwoodiupui mwoodiupui closed this Sep 9, 2021
@mwoodiupui mwoodiupui reopened this Sep 9, 2021
@github-actions github-actions bot added the merge conflict PR has a merge conflict that needs resolution label Oct 19, 2021
@mwoodiupui mwoodiupui removed the merge conflict PR has a merge conflict that needs resolution label Mar 25, 2022
@mwoodiupui mwoodiupui removed the needs triage New issue needs triage and/or scheduling label Mar 28, 2022
@mwoodiupui mwoodiupui added this to Needs Reviewers Assigned in DSpace 7.4 release via automation May 5, 2022
@mwoodiupui mwoodiupui self-assigned this Jun 22, 2022
@tdonohue tdonohue moved this from Needs Reviewers Assigned to Under Review in DSpace 7.4 release Jul 14, 2022
Copy link
Member

@abollini abollini left a comment

Choose a reason for hiding this comment

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

Thanks @mwoodiupui for this PR, I like the direction that you suggest. Inline some request of clarification/small changes

Comment on lines -239 to +247
if (!authorizer.getEmail().equals(context.getCurrentUser().getEmail())) {

boolean authorized = false;
String requester = context.getCurrentUser().getEmail();
for (RequestItemAuthor authorizer : authorizers) {
authorized |= authorizer.getEmail().equals(requester);
}
if (!authorized) {
Copy link
Member

Choose a reason for hiding this comment

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

this is not related to this PR as the behavior is not changing but I want to raise a question that can be eventually moved to a followup ticket if other feel reasonable. Why are we checking authorization here? the user has a valid token, maybe the request email as been forwarded to a trusted colleague asking to proceed in this way we will prevent that. This also require the user to be loggedin and maybe the author is external or not longer affiliated with the repo (this would require also removing the auth annotation check on the method)

Copy link
Member

Choose a reason for hiding this comment

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

just discovered that this is the topic of #8319

dspace/config/spring/api/requestitem.xml Outdated Show resolved Hide resolved
@github-actions github-actions bot added the merge conflict PR has a merge conflict that needs resolution label Aug 17, 2022
@tdonohue
Copy link
Member

@mwoodiupui : Just a quick note that this seems to have a merge conflict now.

@mwoodiupui mwoodiupui removed the merge conflict PR has a merge conflict that needs resolution label Aug 26, 2022
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 @mwoodiupui ! I tested this manually by enabling the CombiningRequestItemStrategy to use the other three options (Metadata, Helpdesk and Collection Admin). It works!

I have a few very minor comments inline which I think should be cleaned up prior to merger. But, overall, this looks great.

dspace/config/spring/api/requestitem.xml Outdated Show resolved Hide resolved
dspace/config/spring/api/requestitem.xml Outdated Show resolved Hide resolved
@tdonohue tdonohue moved this from Under Review to Reviewer Approved in DSpace 7.4 release Sep 1, 2022
@tdonohue
Copy link
Member

tdonohue commented Sep 7, 2022

@abollini : If you have a chance, could you re-review this PR? I believe all your prior feedback has been addressed & this is PR already has a +1 from me (and I tested it and found it to work well). Thanks!

Copy link
Member

@abollini abollini left a comment

Choose a reason for hiding this comment

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

thanks @mwoodiupui all my previous feedback have been addressed. Merging as it is already +1

@abollini abollini merged commit 3b23ff9 into DSpace:main Sep 15, 2022
DSpace 7.4 release automation moved this from Reviewer Approved to Done Sep 15, 2022
@tdonohue tdonohue added this to the 7.4 milestone Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
authorization Related to user authorization / permissions backend: email-system Related to emails sent from DSpace improvement new feature
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

[DS-3951] Send Request Copy email to multiple recipients, and some new recipient strategies
3 participants