Skip to content

Commit 4e5c878

Browse files
committed
Needed to fix the way we write externalId from SCIM
1 parent 7cb4740 commit 4e5c878

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

app/Models/SnipeSCIMConfig.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ function (&$object) {
4141
}
4242
);
4343

44-
$config['validations'][$core.'externalId'] = 'string'; // not required, but supported mostly just for Okta
45-
$mappings['externalId'] = AttributeMapping::eloquent('scim_externalid');
44+
// externalId support
45+
$config['validations'][$core.'externalId'] = 'string|nullable'; // not required, but supported mostly just for Okta
46+
// note that the mapping is *not* namespaced like the other $mappings
47+
$config['mapping']['externalId'] = AttributeMapping::eloquent('scim_externalid');
4648

4749
$config['validations'][$core.'emails'] = 'nullable|array'; // emails are not required in Snipe-IT...
4850
$config['validations'][$core.'emails.*.value'] = 'email'; // ...(had to remove the recommended 'required' here)

app/Models/User.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
6161
'remote',
6262
'start_date',
6363
'end_date',
64+
'scim_externalid'
6465
];
6566

6667
protected $casts = [

0 commit comments

Comments
 (0)