[Minor] Log LDAP groups for user
This commit is contained in:
parent
98a45863d5
commit
384db5e23e
|
@ -95,6 +95,8 @@ public class JsonConfigLdapPrivilegeHandler extends BaseLdapPrivilegeHandler {
|
||||||
@Override
|
@Override
|
||||||
protected Set<String> getLdapGroups(String username, Attributes attrs) throws NamingException {
|
protected Set<String> getLdapGroups(String username, Attributes attrs) throws NamingException {
|
||||||
Set<String> ldapGroups = LdapHelper.getLdapGroups(attrs);
|
Set<String> ldapGroups = LdapHelper.getLdapGroups(attrs);
|
||||||
|
logger.info("User " + username + " has LDAP Groups: ");
|
||||||
|
ldapGroups.forEach(s -> logger.info("- " + s));
|
||||||
|
|
||||||
Set<String> relevantLdapGroups = ldapGroups.stream().filter(s -> this.ldapGroupNames.contains(s))
|
Set<String> relevantLdapGroups = ldapGroups.stream().filter(s -> this.ldapGroupNames.contains(s))
|
||||||
.collect(toSet());
|
.collect(toSet());
|
||||||
|
|
|
@ -72,7 +72,10 @@ public class SimpleLdapPrivilegeHandler extends BaseLdapPrivilegeHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Set<String> getLdapGroups(String username, Attributes attrs) throws NamingException {
|
protected Set<String> getLdapGroups(String username, Attributes attrs) throws NamingException {
|
||||||
return LdapHelper.getLdapGroups(attrs);
|
Set<String> ldapGroups = LdapHelper.getLdapGroups(attrs);
|
||||||
|
logger.info("User " + username + " has LDAP Groups: ");
|
||||||
|
ldapGroups.forEach(s -> logger.info("- " + s));
|
||||||
|
return ldapGroups;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue