mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 21:54:14 -08:00
Force active flag to be returned as true or false
This commit is contained in:
parent
0d29ac9856
commit
7b12d511f8
|
@ -129,8 +129,20 @@ class SnipeSCIMConfig extends \ArieTimmerman\Laravel\SCIMServer\SCIMConfig
|
||||||
'preferredLanguage' => AttributeMapping::eloquent('locale'), // Section 5.3.5 of [RFC7231]
|
'preferredLanguage' => AttributeMapping::eloquent('locale'), // Section 5.3.5 of [RFC7231]
|
||||||
'locale' => null, // see RFC5646
|
'locale' => null, // see RFC5646
|
||||||
'timezone' => null, // see RFC6557
|
'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(),
|
'password' => AttributeMapping::eloquent('password')->disableRead(),
|
||||||
|
|
||||||
// Multi-Valued Attributes
|
// Multi-Valued Attributes
|
||||||
|
|
Loading…
Reference in a new issue