You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The auto-suggest input in the collection access control dialog uses the /roles/_suggest API. To not suggest users that already have access to the collection, the UI passes the IDs of all users and groups that already have access as a query parameter:
Given a collection that is already shared with users 1, 2, and 3, the API URL would look something like this:
Create a large number of groups (250+) and add yourself to these groups. You can also temporarily reduce the Gunicorn request line limit and will experience the issue with a lower number of groups.
Navigate to a collection and open the sharing settings from the settings dropdown.
Click on "Choose a user" and start typing"
Observe the API requests the UI sends in the browser developer tools network tab. You should see requests to /api/2/roles/_suggest with one exclude:id query parameter for every group your user is part of. If the total length of the request URI exceeds the Gunicorn limits, the request will fail.
Expected behavior
The auto-suggest input should work even for users that are members of many groups.
Aleph version
3.15.7, 3.4.0-rc*
Screenshots
Additional context
This error occurs as long as a user is a member of many groups, no matter whether a collection is actually shared with many/all of them.
This error would also occur when sharing an investigation with a large number of users, but this a) is something that users have to do explicitly, and b) I don’t think this was ever an issue before.
Need to double check, but I think /roles/_suggest will only ever return users and never groups, so it isn’t necessary to explicitly exclude group IDs.
The text was updated successfully, but these errors were encountered:
The reason behind excluding specific IDs is to not suggest users and groups that are already associated with the collection. However, the `/roles/_suggest` endpoint returns only users, never groups, so there is no point in explicitly excluding groups. Fixes#3820.
In case a collection is shared with a large (200+) number of individual users, this may cause the same error as reported in #3820. However, this would require explicitly sharing a collection with such a large number of users whereas #3820 affected any collection, even if it wasn’t shared with anyone. Also, I don’t think there has been a use case for sharing a collection with so many individual users, and probably using groups would be more appropriate in such a situation.
The reason behind excluding specific IDs is to not suggest users and groups that are already associated with the collection. However, the `/roles/_suggest` endpoint returns only users, never groups, so there is no point in explicitly excluding groups. Fixes#3820.
In case a collection is shared with a large (200+) number of individual users, this may cause the same error as reported in #3820. However, this would require explicitly sharing a collection with such a large number of users whereas #3820 affected any collection, even if it wasn’t shared with anyone. Also, I don’t think there has been a use case for sharing a collection with so many individual users, and probably using groups would be more appropriate in such a situation.
Describe the bug
The auto-suggest input in the collection access control dialog uses the
/roles/_suggest
API. To not suggest users that already have access to the collection, the UI passes the IDs of all users and groups that already have access as a query parameter:Given a collection that is already shared with users 1, 2, and 3, the API URL would look something like this:
To Reproduce
Steps to reproduce the behavior:
/api/2/roles/_suggest
with oneexclude:id
query parameter for every group your user is part of. If the total length of the request URI exceeds the Gunicorn limits, the request will fail.Expected behavior
The auto-suggest input should work even for users that are members of many groups.
Aleph version
3.15.7, 3.4.0-rc*
Screenshots
Additional context
/roles/_suggest
will only ever return users and never groups, so it isn’t necessary to explicitly exclude group IDs.The text was updated successfully, but these errors were encountered: