mirror of
https://github.com/status-im/codimd.git
synced 2025-02-05 17:43:49 +00:00
Fix typo of "grouptAttribute" in saml auth module
Signed-off-by: Max Wu <jackymaxj@gmail.com>
This commit is contained in:
parent
763479bea8
commit
e0629c7d27
@ -20,14 +20,14 @@ passport.use(new SamlStrategy({
|
|||||||
identifierFormat: config.saml.identifierFormat
|
identifierFormat: config.saml.identifierFormat
|
||||||
}, function (user, done) {
|
}, function (user, done) {
|
||||||
// check authorization if needed
|
// check authorization if needed
|
||||||
if (config.saml.externalGroups && config.saml.grouptAttribute) {
|
if (config.saml.externalGroups && config.saml.groupAttribute) {
|
||||||
var externalGroups = intersection(config.saml.externalGroups, user[config.saml.groupAttribute])
|
var externalGroups = intersection(config.saml.externalGroups, user[config.saml.groupAttribute])
|
||||||
if (externalGroups.length > 0) {
|
if (externalGroups.length > 0) {
|
||||||
logger.error('saml permission denied: ' + externalGroups.join(', '))
|
logger.error('saml permission denied: ' + externalGroups.join(', '))
|
||||||
return done('Permission denied', null)
|
return done('Permission denied', null)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (config.saml.requiredGroups && config.saml.grouptAttribute) {
|
if (config.saml.requiredGroups && config.saml.groupAttribute) {
|
||||||
if (intersection(config.saml.requiredGroups, user[config.saml.groupAttribute]).length === 0) {
|
if (intersection(config.saml.requiredGroups, user[config.saml.groupAttribute]).length === 0) {
|
||||||
logger.error('saml permission denied')
|
logger.error('saml permission denied')
|
||||||
return done('Permission denied', null)
|
return done('Permission denied', null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user