Updated OIDC group attr option name
To match the existing option name for display names. Closes #3704
This commit is contained in:
parent
b9941e8e61
commit
24f82749ff
4 changed files with 6 additions and 6 deletions
|
@ -266,7 +266,7 @@ OIDC_TOKEN_ENDPOINT=null
|
|||
OIDC_ADDITIONAL_SCOPES=null
|
||||
OIDC_DUMP_USER_DETAILS=false
|
||||
OIDC_USER_TO_GROUPS=false
|
||||
OIDC_GROUP_ATTRIBUTE=groups
|
||||
OIDC_GROUPS_CLAIM=groups
|
||||
OIDC_REMOVE_FROM_GROUPS=false
|
||||
|
||||
# Disable default third-party services such as Gravatar and Draw.IO
|
||||
|
|
|
@ -181,7 +181,7 @@ class OidcService
|
|||
*/
|
||||
protected function getUserGroups(OidcIdToken $token): array
|
||||
{
|
||||
$groupsAttr = $this->config()['group_attribute'];
|
||||
$groupsAttr = $this->config()['groups_claim'];
|
||||
if (empty($groupsAttr)) {
|
||||
return [];
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ return [
|
|||
// Enable syncing, upon login, of OIDC groups to BookStack roles
|
||||
'user_to_groups' => env('OIDC_USER_TO_GROUPS', false),
|
||||
// Attribute, within a OIDC ID token, to find group names within
|
||||
'group_attribute' => env('OIDC_GROUP_ATTRIBUTE', 'groups'),
|
||||
'groups_claim' => env('OIDC_GROUPS_CLAIM', 'groups'),
|
||||
// When syncing groups, remove any groups that no longer match. Otherwise sync only adds new groups.
|
||||
'remove_from_groups' => env('OIDC_REMOVE_FROM_GROUPS', false),
|
||||
];
|
||||
|
|
|
@ -40,7 +40,7 @@ class OidcTest extends TestCase
|
|||
'oidc.dump_user_details' => false,
|
||||
'oidc.additional_scopes' => '',
|
||||
'oidc.user_to_groups' => false,
|
||||
'oidc.group_attribute' => 'group',
|
||||
'oidc.groups_claim' => 'group',
|
||||
'oidc.remove_from_groups' => false,
|
||||
]);
|
||||
}
|
||||
|
@ -364,7 +364,7 @@ class OidcTest extends TestCase
|
|||
{
|
||||
config()->set([
|
||||
'oidc.user_to_groups' => true,
|
||||
'oidc.group_attribute' => 'groups',
|
||||
'oidc.groups_claim' => 'groups',
|
||||
'oidc.remove_from_groups' => false,
|
||||
]);
|
||||
$roleA = Role::factory()->create(['display_name' => 'Wizards']);
|
||||
|
@ -390,7 +390,7 @@ class OidcTest extends TestCase
|
|||
{
|
||||
config()->set([
|
||||
'oidc.user_to_groups' => true,
|
||||
'oidc.group_attribute' => 'my.custom.groups.attr',
|
||||
'oidc.groups_claim' => 'my.custom.groups.attr',
|
||||
'oidc.remove_from_groups' => false,
|
||||
]);
|
||||
$roleA = Role::factory()->create(['display_name' => 'Wizards']);
|
||||
|
|
Loading…
Reference in a new issue