Merge pull request #3203 from tubhh/LDAP_bugfix

LDAP Authentication: use generic exception instead of special SQLException
This commit is contained in:
Tim Donohue
2021-03-25 14:42:13 -05:00
committed by GitHub

View File

@@ -141,6 +141,15 @@ public class LDAPAuthentication
// Prevents anonymous users from being added to this group, and the second check
// ensures they are LDAP users
try {
// without a logged in user, this method should return an empty list
if (context.getCurrentUser() == null) {
return Collections.EMPTY_LIST;
}
// if the logged in user does not have a netid, it's not an LDAP user
// and this method should return an empty list
if (context.getCurrentUser().getNetid() == null) {
return Collections.EMPTY_LIST;
}
if (!context.getCurrentUser().getNetid().equals("")) {
String groupName = configurationService.getProperty("authentication-ldap.login.specialgroup");
if ((groupName != null) && (!groupName.trim().equals(""))) {