mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-08-19 20:20:43 +02:00
Keep fixing session issues.
This commit is contained in:
parent
c1318e496c
commit
00fd168489
@ -23,7 +23,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class MultipleSessionsOpenException
|
||||
extends ClientException
|
||||
{
|
||||
public static final String MSG_KEY = "MINDMAP_TIMESTAMP_OUTDATED";
|
||||
public static final String MSG_KEY = "MINDMAP_OUTDATED_BY_YOU";
|
||||
|
||||
public MultipleSessionsOpenException(@NotNull String msg)
|
||||
{
|
||||
@ -35,9 +35,4 @@ public class MultipleSessionsOpenException
|
||||
protected String getMsgBundleKey() {
|
||||
return MSG_KEY;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Object[] getMsgBundleArgs() {
|
||||
return new String[]{"you"};
|
||||
}
|
||||
}
|
||||
|
@ -20,10 +20,10 @@ package com.wisemapping.model;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.servlet.http.HttpSessionBindingEvent;
|
||||
import javax.servlet.http.HttpSessionBindingListener;
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class User
|
||||
extends Collaborator
|
||||
@ -107,8 +107,10 @@ public class User
|
||||
}
|
||||
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
if (this == o)
|
||||
return true;
|
||||
if (o == null || !User.class.getClass().isInstance(o))
|
||||
return false;
|
||||
|
||||
final User user = (User) o;
|
||||
|
||||
|
@ -192,7 +192,7 @@ public class MindmapController extends BaseController {
|
||||
throw new SessionExpiredException(lastEditor);
|
||||
}
|
||||
} else if (outdated) {
|
||||
throw new MultipleSessionsOpenException("The map has been updated and not by you. Session lost.");
|
||||
throw new MultipleSessionsOpenException("Sessions:" + session + ":" + lockInfo.getSession() + "Timestamp: " + timestamp + ": " + lockInfo.getTimestamp());
|
||||
}
|
||||
} else {
|
||||
throw new SessionExpiredException(lockInfo.getUser());
|
||||
|
@ -250,6 +250,7 @@ TEMPORAL_PASSWORD_SENT=Your temporal password has been sent
|
||||
TEMPORAL_PASSWORD_SENT_DETAILS=We've sent you an email that will allow you to reset your password. Please check your email now.
|
||||
TEMPORAL_PASSWORD_SENT_SUPPORT=If you have any problem receiving the email, contact us to <a href\="mailto\:support@wisemapping.com">support@wisemapping.com </a>
|
||||
MINDMAP_TIMESTAMP_OUTDATED=It's not possible to save your changes because your mindmap has been modified by '{0}'. Refresh the page and try again.
|
||||
MINDMAP_OUTDATED_BY_YOU=It's not possible to save your changes because map is out of date. Do you have multiple tabs opened ?. Refresh the page and try again.
|
||||
MINDMAP_LOCKED=Map is being edited by {0} <{1}>. Map is opened in read only mode.
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user