Merge branch 'keycloak-compat' into 'master'
Add Keycloak compat by using first element of role See merge request framasoft/peertube/official-plugins!2
This commit is contained in:
commit
4ddcaddb19
@ -239,8 +239,12 @@ async function handleCb (peertubeHelpers, settingsManager, req, res) {
|
|||||||
|
|
||||||
let role
|
let role
|
||||||
if (settings['role-property']) {
|
if (settings['role-property']) {
|
||||||
|
if (Array.isArray(settings['role-property'])){
|
||||||
|
role = parseInt('' + userInfo[settings['role-property']][0], 10);
|
||||||
|
} else {
|
||||||
role = parseInt('' + userInfo[settings['role-property']], 10)
|
role = parseInt('' + userInfo[settings['role-property']], 10)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let displayName
|
let displayName
|
||||||
if (settings['display-name-property']) {
|
if (settings['display-name-property']) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user