feat(opsserver-access): add admin user listing to the access dashboard

This commit is contained in:
2026-04-08 09:01:08 +00:00
parent 6099563acd
commit 7971bd249e
21 changed files with 291 additions and 11 deletions

View File

@@ -52,6 +52,18 @@ export class AdminHandler {
role: 'admin',
});
}
/**
* Return a safe projection of the users Map — excludes password fields.
* Used by UsersHandler to serve the admin-only listUsers endpoint.
*/
public listUsers(): Array<{ id: string; username: string; role: string }> {
return Array.from(this.users.values()).map((user) => ({
id: user.id,
username: user.username,
role: user.role,
}));
}
private registerHandlers(): void {
// Admin Login Handler