Fix classcast.
This commit is contained in:
@@ -42,7 +42,7 @@ public abstract class BaseSecurityAdvice {
|
||||
isAllowed = isAllowed(user, ((Integer) argument));
|
||||
} else if (argument instanceof Collaborator) {
|
||||
// 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 {
|
||||
throw new IllegalArgumentException("Argument " + argument);
|
||||
}
|
||||
|
@@ -65,4 +65,6 @@ public interface MindmapService {
|
||||
void updateCollaboration(@NotNull Collaborator collaborator, @NotNull Collaboration collaboration) throws WiseMappingException;
|
||||
|
||||
LockManager getLockManager();
|
||||
|
||||
boolean isAdmin(@Nullable User user);
|
||||
}
|
||||
|
Reference in New Issue
Block a user