User Permissions should be obtained in fewer REST requests #3161
Labels
affects: 7.x
Issue impacts 7.x releases
affects: 8.x
Issue impacts 8.x releases
authorization
related to authorization, permissions or groups
bug
claimed: 4Science
4Science team is working on this issue & will contribute back
help wanted
Needs a volunteer to claim to move forward
performance / caching
Related to performance, caching or embedded objects
Describe the bug
In 7.x and 8.x, user permissions are obtained one-by-one in several calls to the
/server/api/authz/authorizations/search/object
endpoint. These requests are most easily seen after login, as you'll see ~10 of these requests in a row for theSite
object:These requests are all identical except for the
feature=
parameter, where they request permissions specific to that feature.In the REST API, we already have a way to request permissions in bulk, by just removing the optional
feature
parameter:Ideally, we should avoid one-by-one requests of this sort, and request all the authorizations at once and cache them for the remainder of the user's session. If additional endpoints or options are necessary in the REST API, then we should add them to better support this request for bulk permissions.
To Reproduce
Steps to reproduce the behavior:
/server/api/authz/authorizations/search/object
endpointExpected behavior
Ideally, we should request user permissions in one request (or fewer requests) and cache them for the remainder of the user's session.
The text was updated successfully, but these errors were encountered: