mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-26 07:44:56 +01:00
Fix classcast.
This commit is contained in:
parent
057d5bc01f
commit
712cc2c60b
@ -42,7 +42,7 @@ public abstract class BaseSecurityAdvice {
|
|||||||
isAllowed = isAllowed(user, ((Integer) argument));
|
isAllowed = isAllowed(user, ((Integer) argument));
|
||||||
} else if (argument instanceof Collaborator) {
|
} else if (argument instanceof Collaborator) {
|
||||||
// Read operation find on the user are allowed ...
|
// Read operation find on the user are allowed ...
|
||||||
isAllowed = user.identityEquality((Collaborator) argument) || ((MindmapServiceImpl) mindmapService).isAdmin(user);
|
isAllowed = user.identityEquality((Collaborator) argument) || mindmapService.isAdmin(user);
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("Argument " + argument);
|
throw new IllegalArgumentException("Argument " + argument);
|
||||||
}
|
}
|
||||||
|
@ -65,4 +65,6 @@ public interface MindmapService {
|
|||||||
void updateCollaboration(@NotNull Collaborator collaborator, @NotNull Collaboration collaboration) throws WiseMappingException;
|
void updateCollaboration(@NotNull Collaborator collaborator, @NotNull Collaboration collaboration) throws WiseMappingException;
|
||||||
|
|
||||||
LockManager getLockManager();
|
LockManager getLockManager();
|
||||||
|
|
||||||
|
boolean isAdmin(@Nullable User user);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user