LdapTemplate ldapTemplate = new LdapTemplate((getContextSource()));
ldapTemplate.setIgnorePartialResultException(true);
ldapTemplate.setIgnoreNameNotFoundException(true);
List<String> ambariAdminGroups = ldapTemplate.search(
groupBase,filterBuilder.toString(),attributesMapper);
//user has admin role granted, if user is a member of at least 1 group,
// which matches the rules in configuration
if (ambariAdminGroups.size() > 0) {