implemented account list

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2026-04-02 13:57:08 +02:00
parent 44fb120891
commit a5d5d5872d
5 changed files with 29 additions and 4 deletions

View File

@@ -412,8 +412,7 @@ public class UserModule extends BaseHandler implements UserService {
private boolean getUserList(HttpExchange ex, UmbrellaUser user) throws IOException, UmbrellaException {
if (!(user instanceof DbUser dbUser && dbUser.permissions().contains(LIST_USERS))) throw forbidden("You are not allowed to list users!");
var list = users.list(0, null,null).values().stream().map(UmbrellaUser::toMap).toList();
return sendContent(ex,list);
return sendContent(ex,users.list(0, null,null).values().stream().map(UmbrellaUser::toMap));
}
private boolean impersonate(HttpExchange ex, Long targetId) throws IOException, UmbrellaException {