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

Contract for isNotMemberOf searches for Groups and EPersons #241

Merged
merged 2 commits into from
Nov 10, 2023

Conversation

tdonohue
Copy link
Member

@tdonohue tdonohue commented Oct 3, 2023

(Replaces #237)

Required by DSpace/DSpace#9052 and DSpace/dspace-angular#2512

Description

In order to fix the performance issues described in the above tickets, we need a way to search across all Groups and all EPersons which are not yet a member of a specific Group in the system.

Therefore, this PR suggests two new REST API endpoints:

  1. GET /api/eperson/groups/search/isNotMemberOf?group=<:uuid>&query=<:string>
    • Will search across all Groups which are not yet a member of the Group specified by group=<:uuid>.
    • This is the same as searching all Groups which are NOT listed under the /api/eperson/groups/<:uuid>/subgroups endpoint for that Group specified by group=<:uuid>
  2. GET /api/eperson/epersons/search/isNotMemberOf?group=<:uuid>&query=<:string>
    • Will search across all EPersons which are not yet a member of the Group specified by group=<:uuid>.
    • This is the same as searching all EPersons which are NOT listed under the /api/eperson/groups/<:uuid>/epersons endpoint for that Group specified by group=<:uuid>

Additional Details on Performance Issue

These new endpoints are required to fix the behavior issues in the Angular UI code. Currently, our Angular UI includes code which requests every EPerson in a Group or every Subgroup in a Group in order to determine whether a given EPerson or Group is already included in a given parent Group.

For example:

This UI behavior will cause performance issues when a Group has a large number of members (either EPerson or Subgroup).

This performance issue will be fixed by now creating performance-friendly endpoints to find non-members.

@tdonohue tdonohue added bug 1 APPROVAL pull request only requires a single approval to merge. labels Oct 3, 2023
@tdonohue tdonohue self-assigned this Oct 3, 2023
@tdonohue tdonohue added this to the 7.6.1 milestone Oct 3, 2023
@tdonohue tdonohue requested a review from abollini October 3, 2023 19:37
@tdonohue
Copy link
Member Author

Implementation PR for this REST Contract now exists at DSpace/DSpace#9125

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.

@tdonohue changes look good thanks

@tdonohue tdonohue merged commit 95e5748 into main Nov 10, 2023
@tdonohue tdonohue deleted the search-nonmembers branch November 10, 2023 19:02
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. bug
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants