feat(admin): display external users for security reasons

This commit is contained in:
Edouard Vanbelle
2026-07-19 15:45:09 +02:00
parent 03a63d0161
commit e003a8c55b
18 changed files with 83 additions and 17 deletions
+6 -1
View File
@@ -754,9 +754,14 @@ pub async fn list_users(
let limit = query.limit.unwrap_or(100).min(500);
let offset = query.offset.unwrap_or(0);
// Admin surface must show *every* account for audit — grant-only
// magic-link / OCM recipients (is_external = true) included. The
// internal-only variant is used by system address book / sharee
// search, where surfacing externals would leak identities. See
// `auth_application_service::list_users` doc for the split.
let users = auth
.auth_application_service
.list_users(limit, offset)
.list_users_including_external(limit, offset)
.await
.map_err(|e| AppError::internal_error(format!("Failed to list users: {}", e)))?;