Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
17.10.0
-
None
-
Unknown
-
Description
uorgsuggest.vm returns at most limit suggestions, 10 by default, but the XWQL query it runs has no limit. The template iterates the whole result set and keeps the first suggestions the current user can view, so a wiki with many matching users fetches every match to return 10 of them.
The query is unlimited because the view right is checked after it: a limited query could return fewer viewable suggestions than asked.
Proposal
Fetch batches of increasing size, up to an upper limit, until enough viewable suggestions are collected or no match is left. Velocity is a poor place for that loop, so it belongs in a script service or a component, or better in a REST resource for the user and group suggestions.
Raised while reviewing https://github.com/xwiki/xwiki-platform/pull/7269 .
Attachments
Issue Links
- is related to
-
XWIKI-25464 Add support for users mentions in BlockNote
-
- Closed
-