Disallow LDAP bind if trap is set; support setting trap from user form
This commit is contained in:
@@ -90,6 +90,11 @@ class LDAPController extends Injectable {
|
||||
return next(new LDAP.InvalidCredentialsError())
|
||||
}
|
||||
|
||||
// Check if the resource has a trap. If so, deny access.
|
||||
if ( item.trap ) {
|
||||
return next(new LDAP.InvalidCredentialsError('This resource currently has a login trap set. Please visit the web UI to release.'))
|
||||
}
|
||||
|
||||
this.output.info(`Successfully bound resource as DN: ${req.dn.format(this.configs.get('ldap:server.format'))}.`)
|
||||
res.end()
|
||||
return next()
|
||||
|
||||
Reference in New Issue
Block a user