mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-12-23 03:43:48 +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));
|
||||
} 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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user