snoopdave commented on code in PR #222:
URL: https://github.com/apache/roller/pull/222#discussion_r4394672770
##########
app/src/main/java/org/apache/roller/weblogger/ui/struts2/ajax/UserDataServlet.java:
##########
@@ -109,6 +109,11 @@ public void doGet(HttpServletRequest request,
HttpServletResponse response)
List<User> users = umgr.getUsersStartingWith(startsWith,
enabledOnly, offset, length);
for (User user : users) {
+ // the query also matches email addresses, which only
+ // admins may search by
+ if (!admin && !userNameStartsWith(user, startsWith)) {
Review Comment:
🤖Claude: fixed by adding UserManager.getUsersWithUserNameStartingWith with
two user-name-only named queries (same ESCAPE '!' handling); the servlet uses
it for non-admins and keeps the user name or email query for admins, so paging
and matching agree. The post-query filter and its test are gone; UserTest
covers the new lookup (d1f752e5e).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]