Search in sources :

Example 16 with ActionType

use of org.olat.core.logging.activity.ActionType in project openolat by klemens.

the class RepositoryManager method removeParticipant.

private void removeParticipant(Identity ureqIdentity, Identity identity, RepositoryEntry re, MailPackage mailing, boolean sendMail) {
    repositoryEntryRelationDao.removeRole(identity, re, GroupRoles.participant.name());
    if (sendMail) {
        RepositoryMailing.sendEmail(ureqIdentity, identity, re, RepositoryMailing.Type.removeParticipant, mailing);
    }
    ActionType actionType = ThreadLocalUserActivityLogger.getStickyActionType();
    ThreadLocalUserActivityLogger.setStickyActionType(ActionType.admin);
    try {
        ThreadLocalUserActivityLogger.log(GroupLoggingAction.GROUP_OWNER_REMOVED, getClass(), LoggingResourceable.wrap(re, OlatResourceableType.genRepoEntry), LoggingResourceable.wrap(identity));
    } finally {
        ThreadLocalUserActivityLogger.setStickyActionType(actionType);
    }
    log.audit("Identity(.key):" + ureqIdentity.getKey() + " removed identity '" + identity.getName() + "' from repositoryentry with key " + re.getKey());
}
Also used : ActionType(org.olat.core.logging.activity.ActionType)

Aggregations

ActionType (org.olat.core.logging.activity.ActionType)16 Identity (org.olat.core.id.Identity)6 ArrayList (java.util.ArrayList)4 MailPackage (org.olat.core.util.mail.MailPackage)2 RepositoryEntryMembershipModifiedEvent (org.olat.repository.model.RepositoryEntryMembershipModifiedEvent)2 ResourceReservation (org.olat.resource.accesscontrol.ResourceReservation)2