mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-09-12 07:10:07 +02:00
Replace all User.equals for Collaborator.identityEquality
This commit is contained in:
parent
596aeeebc4
commit
6560973237
@ -36,7 +36,7 @@ public enum MindmapFilter {
|
|||||||
MY_MAPS("my_maps") {
|
MY_MAPS("my_maps") {
|
||||||
@Override
|
@Override
|
||||||
boolean accept(@NotNull Mindmap mindmap, @NotNull User user) {
|
boolean accept(@NotNull Mindmap mindmap, @NotNull User user) {
|
||||||
return mindmap.getCreator().equals(user);
|
return mindmap.getCreator().identityEquality(user);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
STARRED("starred") {
|
STARRED("starred") {
|
||||||
|
@ -68,7 +68,7 @@ public class RestLockInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isLockedByMe() {
|
public boolean isLockedByMe() {
|
||||||
return isLocked() && lockInfo != null && lockInfo.getUser().equals(user);
|
return isLocked() && lockInfo != null && lockInfo.getUser().identityEquality(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLockedByMe(boolean lockedForMe) {
|
public void setLockedByMe(boolean lockedForMe) {
|
||||||
|
@ -69,7 +69,7 @@ class LockManagerImpl implements LockManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final LockInfo result = this.getLockInfo(mindmap);
|
final LockInfo result = this.getLockInfo(mindmap);
|
||||||
if (!result.getUser().equals(user)) {
|
if (!result.getUser().identityEquality(user)) {
|
||||||
throw new IllegalStateException("Could not update map lock timeout if you are not the locking user. User:" + result.getUser() + ", " + user);
|
throw new IllegalStateException("Could not update map lock timeout if you are not the locking user. User:" + result.getUser() + ", " + user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user