Abteilungs-Präfixe und RPA-Gruppen optional

Beide Felder sind nicht mehr pflichtmäßig in der Validierung.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-03 07:15:09 +02:00
co-authored by Claude Sonnet 4.6
parent 34811ff583
commit 189e0b23bd
+1 -6
View File
@@ -229,15 +229,10 @@ function Get-SettingsValidationErrors {
$errs += "Mindestens ein Scope erforderlich."
}
$deptPrefixes = Get-DepartmentPrefixes -Settings $S
if ($deptPrefixes.Count -eq 0) {
$errs += "Mindestens ein Abteilungs-Praefix erforderlich."
} else {
if ($deptPrefixes.Count -gt 0) {
$bad = @($deptPrefixes | Where-Object { $_.Trim().Length -lt 2 })
if ($bad.Count -gt 0) { $errs += "Abteilungs-Praefixe muessen jeweils mindestens 2 Zeichen lang sein." }
}
if (-not $S.rpa.groupNames -or @($S.rpa.groupNames).Count -eq 0) {
$errs += "Mindestens eine RPA-Gruppe erforderlich."
}
$allowedUserFields = @('displayName','userPrincipalName','mail','department')
$bad = @($S.userSearch.fields | Where-Object { $_ -notin $allowedUserFields })
if ($bad.Count -gt 0) { $errs += "Unbekannte User-Search-Felder: $($bad -join ', ')" }