use of cz.metacentrum.perun.audit.events.AttributesManagerEvents.AttributeRemovedForUes in project perun by CESNET.
the class AttributesManagerBlImpl method removeAttributeWithoutCheck.
private boolean removeAttributeWithoutCheck(PerunSession sess, UserExtSource ues, AttributeDefinition attribute) throws WrongAttributeAssignmentException {
getAttributesManagerImpl().checkNamespace(sess, attribute, AttributesManager.NS_UES_ATTR);
if (getAttributesManagerImpl().isCoreAttribute(sess, attribute))
throw new WrongAttributeAssignmentException(attribute);
boolean changed = getAttributesManagerImpl().removeAttribute(sess, ues, attribute);
if (changed) {
getAttributesManagerImpl().changedAttributeHook(sess, ues, new Attribute(attribute));
log.info("{} removed attribute {} from user external source {}.", sess.getLogId(), attribute.getName(), ues.getId());
getPerunBl().getAuditer().log(sess, new AttributeRemovedForUes(new AttributeDefinition(attribute), ues));
}
return changed;
}
Aggregations