Skip to content
Snippets Groups Projects
Commit 514ad335 authored by srosse's avatar srosse
Browse files

Merge OpenOLAT default branch to OpenOLAT 13a with bd18aa37ed5fa2b5f04dc0df5144b1257cf4955e

parents b873c052 2c872d14
No related branches found
No related tags found
No related merge requests found
......@@ -63,6 +63,7 @@ import org.olat.core.util.mail.MailBundle;
import org.olat.core.util.mail.MailManager;
import org.olat.core.util.mail.MailTemplate;
import org.olat.core.util.mail.MailerResult;
import org.olat.core.util.session.UserSessionManager;
import org.olat.properties.Property;
import org.olat.properties.PropertyManager;
import org.olat.registration.RegistrationManager;
......@@ -114,6 +115,8 @@ public class UserDeletionManager {
@Autowired
private MailManager mailManager;
@Autowired
private UserSessionManager userSessionManager;
@Autowired
private AuthenticationHistoryDAO suthenticationHistoryDao;
@Autowired
private GroupDAO groupDao;
......@@ -273,6 +276,9 @@ public class UserDeletionManager {
*/
public void deleteIdentity(Identity identity) {
log.info("Start deleteIdentity for identity=" + identity);
//logout
userSessionManager.signOffAndClearAll(identity);
String newName = getBackupStringWithDate(identity.getName());
......
......@@ -28,11 +28,13 @@ import java.util.Set;
import java.util.TreeSet;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
import javax.annotation.PostConstruct;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.olat.basesecurity.IdentityRef;
import org.olat.core.commons.persistence.DB;
import org.olat.core.gui.control.Disposable;
import org.olat.core.gui.control.Event;
......@@ -328,6 +330,21 @@ public class UserSessionManager implements GenericEventListener {
}
}
/**
* The method will logout the specified user from all of its
* session, UI, WebDAV, REST...
* @param identity
*/
public void signOffAndClearAll(IdentityRef identity) {
List<UserSession> userSessions = authUserSessions.stream()
.filter(userSession -> userSession.getIdentity() != null && userSession.getIdentity().getKey().equals(identity.getKey()))
.collect(Collectors.toList());
for(UserSession userSession:userSessions) {
internSignOffAndClear(userSession);
dbInstance.commit();
}
}
/**
* called to make sure the current authenticated user (if there is one at all)
* is cleared and signed off. This method is firing the SignOnOffEvent Multiuserevent.
......
......@@ -107,6 +107,11 @@ public class SharedItemsOverviewController extends BasicController implements Ac
List<ContextEntry> subEntries = entries.subList(1, entries.size());
doOpenBinders(ureq).activate(ureq, subEntries, entries.get(0).getTransientState());
segmentView.select(bindersLink);
} else if("Binder".equalsIgnoreCase(name)) {
doOpenBinders(ureq).activate(ureq, entries, state);
segmentView.select(bindersLink);
} else {
activateCold(ureq);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment