mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-13 21:53:43 +01:00
Remove LDAP admin check via group search in ldap-passport
This commit is contained in:
@@ -30,9 +30,8 @@ const LDAPAuthenticationManager = {
|
||||
if (!firstName && !lastName) lastName = email
|
||||
let isAdmin = false
|
||||
if( attAdmin && valAdmin ) {
|
||||
isAdmin = (profile._groups?.length > 0) ||
|
||||
(Array.isArray(profile[attAdmin]) ? profile[attAdmin].includes(valAdmin) :
|
||||
profile[attAdmin] === valAdmin)
|
||||
isAdmin = Array.isArray(profile[attAdmin]) ? profile[attAdmin].includes(valAdmin) :
|
||||
profile[attAdmin] === valAdmin
|
||||
}
|
||||
let user = await User.findOne({ 'email': email }).exec()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user