use of org.springframework.ldap.InvalidAttributeValueException in project perun by CESNET.
the class UserAttributeProcessor method processAdminAdded.
public void processAdminAdded(String msg, MessageBeans beans) {
if (beans.getUser() == null) {
return;
}
PerunBean admined = null;
try {
if (beans.getVo() != null) {
admined = beans.getVo();
perunUser.addAsVoAdmin(beans.getUser(), beans.getVo());
} else if (beans.getGroup() != null) {
admined = beans.getGroup();
perunUser.addAsGroupAdmin(beans.getUser(), beans.getGroup());
} else if (beans.getFacility() != null) {
admined = beans.getFacility();
perunUser.addAsFacilityAdmin(beans.getUser(), beans.getFacility());
}
} catch (NamingException | InternalErrorException e) {
log.error("Error adding user {} as admin of {}: {}", beans.getUser().getId(), admined.getId(), ((InvalidAttributeValueException) e).getExplanation(), e);
}
}
Aggregations