use of cz.metacentrum.perun.audit.events.AttributesManagerEvents.AttributeRemovedForMemberAndGroup in project perun by CESNET.
the class AttributesManagerBlImpl method removeAttributeWithoutCheck.
// s workWithUserAttr.
@Override
public boolean removeAttributeWithoutCheck(PerunSession sess, Member member, Group group, AttributeDefinition attribute) throws WrongAttributeAssignmentException, MemberGroupMismatchException {
this.checkMemberIsFromTheSameVoLikeGroup(sess, member, group);
getAttributesManagerImpl().checkNamespace(sess, attribute, NS_MEMBER_GROUP_ATTR);
if (getAttributesManagerImpl().isCoreAttribute(sess, attribute))
throw new WrongAttributeAssignmentException(attribute);
boolean changed = getAttributesManagerImpl().removeAttribute(sess, member, group, attribute);
if (changed) {
getAttributesManagerImpl().changedAttributeHook(sess, member, group, new Attribute(attribute));
log.info("{} removed attribute {} from member {} in group {}.", sess.getLogId(), attribute.getName(), member.getId(), group.getId());
getPerunBl().getAuditer().log(sess, new AttributeRemovedForMemberAndGroup(new AttributeDefinition(attribute), member, group));
}
return changed;
}
Aggregations