use of cz.metacentrum.perun.audit.events.MembersManagerEvents.MemberDisabled in project perun by CESNET.
the class MembersManagerBlImpl method disableMember.
@Override
public Member disableMember(PerunSession sess, Member member) throws MemberNotValidYetException {
if (this.haveStatus(sess, member, Status.DISABLED)) {
log.debug("Trying to disable member who is already disabled. " + member);
return member;
}
if (this.haveStatus(sess, member, Status.INVALID))
throw new MemberNotValidYetException(member);
getMembersManagerImpl().setStatus(sess, member, Status.DISABLED);
member.setStatus(Status.DISABLED);
getPerunBl().getAuditer().log(sess, new MemberDisabled(member));
return member;
}
use of cz.metacentrum.perun.audit.events.MembersManagerEvents.MemberDisabled in project perun by CESNET.
the class urn_perun_member_attribute_def_def_suspensionInfo method resolveVirtualAttributeValueChange.
@Override
public List<AuditEvent> resolveVirtualAttributeValueChange(PerunSessionImpl session, AuditEvent message) throws WrongReferenceAttributeValueException, WrongAttributeAssignmentException {
Member member = null;
if (message instanceof MemberValidated) {
member = ((MemberValidated) message).getMember();
} else if (message instanceof MemberDisabled) {
member = ((MemberDisabled) message).getMember();
} else if (message instanceof MemberExpired) {
member = ((MemberExpired) message).getMember();
}
clearSuspensionInfo(session, member);
return new ArrayList<>();
}
Aggregations