use of cz.metacentrum.perun.audit.events.AttributesManagerEvents.AttributeRemovedForMember in project perun by CESNET.
the class AttributesManagerBlImpl method removeAttributeWithoutCheck.
@Override
public boolean removeAttributeWithoutCheck(PerunSession sess, Member member, AttributeDefinition attribute) throws WrongAttributeAssignmentException {
getAttributesManagerImpl().checkNamespace(sess, attribute, NS_MEMBER_ATTR);
if (getAttributesManagerImpl().isCoreAttribute(sess, attribute))
throw new WrongAttributeAssignmentException(attribute);
boolean changed = getAttributesManagerImpl().removeAttribute(sess, member, attribute);
if (changed) {
try {
getAttributesManagerImpl().changedAttributeHook(sess, member, new Attribute(attribute));
} catch (WrongReferenceAttributeValueException ex) {
throw new InternalErrorException(ex);
}
log.info("{} removed attribute {} from member {}.", sess.getLogId(), attribute.getName(), member.getId());
getPerunBl().getAuditer().log(sess, new AttributeRemovedForMember(new AttributeDefinition(attribute), member));
}
return changed;
}
Aggregations