Merge pull request #12049 from uberbrady/improve_scim_externalid_support

Fixed writes to the `externalId` from SCIM
This commit is contained in:
snipe 2022-11-02 15:43:55 -07:00 committed by GitHub
commit 6d5ace0458
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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 = [