-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Provision API pagination for subadmins is broken #19964
Comments
@rperezb please add tests to the QA plan - THX |
I already made an issue a while back for the |
@rullzer is that still an issue ? |
yes. |
Is this really a sev2? |
Moving to 9.2 as per PR |
@tomneedham assigning to you as you're familiar with that API. I'm aware that you might not have time, but let's see if you have some insights. |
moving to backlog as no one complained about this, maybe no one is actually using this pagination currently |
Hey, this issue has been closed because the label (This is an automated comment from GitMate.io.) |
Hey, this issue has been closed because the label (This is an automated comment from GitMate.io.) |
This issue has been automatically closed. |
Now that we allow subadmins to get the list of users they have access to via the provisioning API we run into issues.
core/apps/provisioning_api/lib/users.php
Lines 84 to 97 in e1e1f4f
As you can see what we do there is for each group the subadmin is a subadmin of we get the list of users. We merge those lists and then slice the array accordingly.
Now this introduces a few issues:
To solve problem 1 I think we might need to introduce new calls to the groupManager i.e.
displayNamesInGroups
and then the additional calls all the way down. This will allow us to let the backend handle deduplication (which is most likely can do much more efficiently).Problem 2 is something different but can be solved with integration tests. Basically we do not quarantee any order on the results. So if we fill the database with random users to query all we need to check is if (when doing pagination) all users get enumerated exactly once.
Tagging for 9.0 since especially problem 1 could be an issue for large installs.
CC: @DeepDiver1975 @tomneedham
The text was updated successfully, but these errors were encountered: