Add embedded and public view compatibility.
Remove Utils method
This commit is contained in:
@@ -24,6 +24,7 @@ import com.wisemapping.model.CollaborationRole;
|
||||
import com.wisemapping.model.User;
|
||||
import com.wisemapping.model.MindMap;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class ViewBaseSecurityAdvise
|
||||
extends BaseSecurityAdvice
|
||||
@@ -34,11 +35,11 @@ public class ViewBaseSecurityAdvise
|
||||
return methodInvocation.proceed();
|
||||
}
|
||||
|
||||
protected boolean isAllowed(@NotNull User user, MindMap map) {
|
||||
protected boolean isAllowed(@Nullable User user, MindMap map) {
|
||||
return getMindmapService().hasPermissions(user, map, CollaborationRole.VIEWER);
|
||||
}
|
||||
|
||||
protected boolean isAllowed(@NotNull User user, int mapId) {
|
||||
protected boolean isAllowed(@Nullable User user, int mapId) {
|
||||
return getMindmapService().hasPermissions(user, mapId, CollaborationRole.VIEWER);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user