Merge pull request #13948 from uberbrady/scim_active_flag

SCIM active flag must be a boolean
This commit is contained in:
snipe 2023-11-23 16:44:22 +00:00 committed by GitHub
commit 0ff99f0479
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -129,8 +129,20 @@ class SnipeSCIMConfig extends \ArieTimmerman\Laravel\SCIMServer\SCIMConfig
'preferredLanguage' => AttributeMapping::eloquent('locale'), // Section 5.3.5 of [RFC7231]
'locale' => null, // see RFC5646
'timezone' => null, // see RFC6557
'active' => AttributeMapping::eloquent('activated'),
'active' => (new AttributeMapping())->setAdd(
function ($value, &$object) {
$object->activated = $value;
}
)->setReplace(
function ($value, &$object) {
$object->activated = $value;
}
)->setRead(
// this works as specified.
function (&$object) {
return (bool)$object->activated;
}
),
'password' => AttributeMapping::eloquent('password')->disableRead(),
// Multi-Valued Attributes