Needed to fix the way we write externalId from SCIM

This commit is contained in:
Brady Wetherington 2022-10-31 19:15:08 -07:00
parent 7cb4740359
commit 4e5c878b73
2 changed files with 5 additions and 2 deletions

View file

@ -41,8 +41,10 @@ class SnipeSCIMConfig extends \ArieTimmerman\Laravel\SCIMServer\SCIMConfig
}
);
$config['validations'][$core.'externalId'] = 'string'; // not required, but supported mostly just for Okta
$mappings['externalId'] = AttributeMapping::eloquent('scim_externalid');
// externalId support
$config['validations'][$core.'externalId'] = 'string|nullable'; // not required, but supported mostly just for Okta
// note that the mapping is *not* namespaced like the other $mappings
$config['mapping']['externalId'] = AttributeMapping::eloquent('scim_externalid');
$config['validations'][$core.'emails'] = 'nullable|array'; // emails are not required in Snipe-IT...
$config['validations'][$core.'emails.*.value'] = 'email'; // ...(had to remove the recommended 'required' here)

View file

@ -61,6 +61,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
'remote',
'start_date',
'end_date',
'scim_externalid'
];
protected $casts = [