diff --git a/lib/Service/ProvisioningService.php b/lib/Service/ProvisioningService.php index e41769fc..b852dc50 100644 --- a/lib/Service/ProvisioningService.php +++ b/lib/Service/ProvisioningService.php @@ -427,6 +427,14 @@ public function getSyncGroupsOfToken(int $providerId, object $idTokenPayload) { if ($event->hasValue() && $event->getValue() !== null) { // casted to null if empty value $groups = json_decode($event->getValue() ?? ''); + // support values like group1,group2 + if (is_string($groups)) { + $groups = explode(',', $groups); + // remove surrounding spaces in each group + $groups = array_map('trim', $groups); + // remove empty strings + $groups = array_filter($groups); + } $syncGroups = []; foreach ($groups as $k => $v) { diff --git a/src/components/SettingsForm.vue b/src/components/SettingsForm.vue index 3e369c5f..e8acc8a7 100644 --- a/src/components/SettingsForm.vue +++ b/src/components/SettingsForm.vue @@ -238,7 +238,7 @@ {{ t('user_oidc', 'Use group provisioning.') }}
- {{ t('user_oidc', 'This will create and update the users groups depending on the groups claim in the id token. The Format of the groups claim value should be [{gid: "1", displayName: "group1"}, ...] or ["group1", "group2", ...]') }} + {{ t('user_oidc', 'This will create and update the users groups depending on the groups claim in the id token. The Format of the groups claim value should be [{gid: "1", displayName: "group1"}, ...] or ["group1", "group2", ...] or "group1,group2"') }}