Set anonymousReadOnly true when userDn is not provided

Fixes gh-473
This commit is contained in:
Eddú Meléndez
2018-01-22 22:32:08 -05:00
committed by Rob Winch
parent f09881c002
commit 0ebfec5df5
2 changed files with 62 additions and 0 deletions

View File

@@ -413,6 +413,7 @@ public abstract class AbstractContextSource implements BaseLdapPathContextSource
LOG.debug("AuthenticationSource not set - " + "using default implementation");
if (!StringUtils.hasText(userDn)) {
LOG.info("Property 'userDn' not set - " + "anonymous context will be used for read-write operations");
anonymousReadOnly = true;
}
else if (!StringUtils.hasText(password)) {
LOG.info("Property 'password' not set - " + "blank password will be used");