feat: LDAP-User-Sync in Mandanten-Benutzerliste

Neuer Endpoint POST /api/admin/tenants/{id}/ldap/sync importiert alle
LDAP-User (source=ldap) per UpsertLDAPUser in die Tenant-Benutzerliste.
Im Nutzer-Dialog erscheint ein "LDAP-Benutzer synchronisieren"-Button
wenn LDAP für den Mandanten aktiv ist. Unterstützt Univention UCS
(mailPrimaryAddress, inetOrgPerson). Benutzertabelle zeigt jetzt auch
die Quelle (local/ldap).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
sysops
2026-03-20 11:35:02 +01:00
parent 2da61689ea
commit 72b023b598
4 changed files with 218 additions and 1 deletions
+10
View File
@@ -48,6 +48,7 @@ export interface User {
username: string;
email: string;
role: string;
source?: string;
active: boolean;
tenant_id?: number;
}
@@ -879,6 +880,15 @@ export async function testAdminTenantLDAPConfig(
});
}
export interface LDAPSyncResult {
synced: number;
errors: string[];
}
export async function syncAdminTenantLDAP(tenantID: number): Promise<LDAPSyncResult> {
return request<LDAPSyncResult>(`/api/admin/tenants/${tenantID}/ldap/sync`, { method: "POST", body: "{}" });
}
// ── Profil-Einstellungen ──────────────────────────────────────────────────
export async function changePassword(