feat(admin): improve user management page #1847
Conversation
Assisted-By: anthropic:claude-opus-4-7[1m]
… update Assisted-By: github:claude-opus-4.6, github:claude-sonnet-4.6, anthropic:claude-opus-4-7[1m]
| } | ||
| var json = user.toUserJson(); | ||
| var serverUrl = UrlUtil.getBaseUrl(); | ||
| json.setRole(user.getRole()); |
There was a problem hiding this comment.
if the role is not part anymore of the User object, the frontend will not be able to check if the current user is an admin I guess?
There was a problem hiding this comment.
UserData::toUserJson is already setting the role, here we're just adding it twice
| import java.util.List; | ||
|
|
||
| @JsonInclude(Include.NON_NULL) | ||
| public class UserAdminJson { |
There was a problem hiding this comment.
nitpick (non-blocking): This is a somewhat weak name as it describes where it's used rather than what it is. A stronger name would be something like UserRelationshipsJson to indicate that that it contains user relation data.
|
|
||
| if (StringUtils.isNotBlank(search)) { | ||
| var like = "%" + search.toLowerCase(Locale.ROOT) + "%"; | ||
| var searchCondition = DSL.lower(USER_DATA.LOGIN_NAME).like(like) |
There was a problem hiding this comment.
question: Do we need 6 sequential wildcard searches? These are going to cause a massive hit to the database if there's no match. While this is for admins only, this could still be a performance issue that bogs the service down as it won't ever use table indexes.
There was a problem hiding this comment.
yeah, that might be a bit of an overkill, I guess
Resolves #1786
Assisted-By: github:claude-opus-4.6, github:claude-sonnet-4.6, anthropic:claude-opus-4-7[1m]