Search in sources :

Example 1 with MemberUnsuspended

use of cz.metacentrum.perun.audit.events.MembersManagerEvents.MemberUnsuspended in project perun by CESNET.

the class VosManagerBlImpl method removeBan.

@Override
public void removeBan(PerunSession sess, int banId) throws BanNotExistsException {
    BanOnVo ban = vosManagerImpl.getBanById(sess, banId);
    vosManagerImpl.removeBan(sess, banId);
    Member member;
    try {
        member = perunBl.getMembersManagerBl().getMemberById(sess, ban.getMemberId());
    } catch (MemberNotExistsException e) {
        // shouldn't happen
        log.error("Failed to find member who was just banned.", e);
        throw new ConsistencyErrorException("Failed to find member who was just banned.", e);
    }
    perunBl.getAuditer().log(sess, new MemberUnsuspended(member));
}
Also used : MemberUnsuspended(cz.metacentrum.perun.audit.events.MembersManagerEvents.MemberUnsuspended) BanOnVo(cz.metacentrum.perun.core.api.BanOnVo) ConsistencyErrorException(cz.metacentrum.perun.core.api.exceptions.ConsistencyErrorException) MemberNotExistsException(cz.metacentrum.perun.core.api.exceptions.MemberNotExistsException) Member(cz.metacentrum.perun.core.api.Member)

Aggregations

MemberUnsuspended (cz.metacentrum.perun.audit.events.MembersManagerEvents.MemberUnsuspended)1 BanOnVo (cz.metacentrum.perun.core.api.BanOnVo)1 Member (cz.metacentrum.perun.core.api.Member)1 ConsistencyErrorException (cz.metacentrum.perun.core.api.exceptions.ConsistencyErrorException)1 MemberNotExistsException (cz.metacentrum.perun.core.api.exceptions.MemberNotExistsException)1