alephdata / aleph

Search and browse documents and data; find the people and companies you look for.
http://docs.aleph.occrp.org
MIT License
2k stars 267 forks source link

Fix user auto-suggest input / do not explicitly exclude group IDs #3821

Closed tillprochaska closed 1 month ago

tillprochaska commented 1 month ago

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.

You can verify this by adding yourself to a few user groups:

aleph creategroup test1
aleph creategroup test2
aleph creategroup test3
aleph useradd test1 user@example.org
aleph useradd test2 user@example.org
aleph useradd test3 user@example.org