mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-12-23 11:53:48 +01:00
Update session for the same user.
This commit is contained in:
parent
6560973237
commit
07c8a1d8c7
@ -41,4 +41,6 @@ public interface LockManager {
|
||||
|
||||
@NotNull
|
||||
LockInfo lock(@NotNull Mindmap mindmap, @NotNull User user) throws WiseMappingException;
|
||||
|
||||
long generateSession();
|
||||
}
|
||||
|
@ -114,6 +114,11 @@ class LockManagerImpl implements LockManager {
|
||||
return this.lock(mindmap, user, System.nanoTime());
|
||||
}
|
||||
|
||||
@Override
|
||||
public long generateSession() {
|
||||
return System.nanoTime();
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public LockInfo lock(@NotNull Mindmap mindmap, @NotNull User user, long session) throws WiseMappingException {
|
||||
|
@ -163,7 +163,7 @@ public class MindmapController {
|
||||
} else {
|
||||
final LockInfo lock = lockManager.lock(mindmap, collaborator);
|
||||
model.addAttribute("lockTimestamp", lock.getTimestamp());
|
||||
model.addAttribute(LOCK_SESSION_ATTRIBUTE, lock.getSession());
|
||||
model.addAttribute(LOCK_SESSION_ATTRIBUTE, lockManager.generateSession());
|
||||
}
|
||||
model.addAttribute("lockInfo", lockManager.getLockInfo(mindmap));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user