Styling
This commit is contained in:
parent
d710d88ed6
commit
0af3ccbe9c
@ -328,16 +328,17 @@ async function buildUser (settingsManager, samlUser) {
|
|||||||
let username = findInUser(samlUser, settings['username-property']) || ''
|
let username = findInUser(samlUser, settings['username-property']) || ''
|
||||||
username = username.replace(/[^a-z0-9._]/g, '_')
|
username = username.replace(/[^a-z0-9._]/g, '_')
|
||||||
|
|
||||||
let sent_role = findInUser(samlUser, settings['role-property'])
|
let sentRole = findInUser(samlUser, settings['role-property'])
|
||||||
let parsed_role = parseInt(sent_role, 10)
|
let parsedRole = parseInt(sentRole, 10)
|
||||||
if (!Number.isSafeInteger(parsed_role)) {
|
|
||||||
parsed_role = undefined
|
if (!Number.isSafeInteger(parsedRole)) {
|
||||||
|
parsedRole = undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
username,
|
username,
|
||||||
email: findInUser(samlUser, settings['mail-property']),
|
email: findInUser(samlUser, settings['mail-property']),
|
||||||
displayName: findInUser(samlUser, settings['display-name-property']),
|
displayName: findInUser(samlUser, settings['display-name-property']),
|
||||||
role: parsed_role
|
role: parsedRole
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user