Skip to content
GitLab
Explore
Sign in
libre.sh
scim
rocketchat-scim
Compare revisions
d873ef6b13be17ed421d8d41823cb968f06d6fab to 56855682e140a2f8af96f40368fe08ea6dcf37dc
Commits on Source (2)
fix: don't panic when no email
· c1bb4ca0
Hugo Renard
authored
Oct 19, 2022
c1bb4ca0
v0.0.4
· 56855682
Hugo Renard
authored
Oct 19, 2022
56855682
Hide whitespace changes
Inline
Side-by-side
app.json
View file @
56855682
{
"id"
:
"53fd430f-3924-4c6c-8774-b23fabfeb0e5"
,
"version"
:
"0.0.
3
"
,
"version"
:
"0.0.
4
"
,
"requiredApiVersion"
:
"^1.31.0"
,
"iconFile"
:
"icon.png"
,
"author"
:
{
...
...
src/scim/User.ts
View file @
56855682
...
...
@@ -24,8 +24,10 @@ export class SCIMUser implements ISCIMResource {
public
static
fromRC
(
rc
:
IUser
):
SCIMUser
{
const
user
=
new
SCIMUser
();
user
.
id
=
rc
.
_id
;
const
email
=
rc
.
emails
[
0
];
user
.
emails
=
[{
primary
:
true
,
value
:
email
.
address
}];
if
(
rc
.
emails
&&
rc
.
emails
.
length
>
0
)
{
const
email
=
rc
.
emails
[
0
];
user
.
emails
=
[{
primary
:
true
,
value
:
email
.
address
}];
}
user
.
displayName
=
rc
.
name
;
user
.
userName
=
rc
.
username
;
user
.
meta
.
created
=
new
Date
(
rc
.
createdAt
);
...
...