mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-09-12 07:10:07 +02:00
Fix problem opening public maps.
This commit is contained in:
parent
4c988d4ae2
commit
a1199687d4
@ -20,6 +20,7 @@ package com.wisemapping.dao;
|
|||||||
|
|
||||||
import com.wisemapping.model.*;
|
import com.wisemapping.model.*;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -37,6 +38,7 @@ public interface MindmapManager {
|
|||||||
|
|
||||||
List<Mindmap> getAllMindmaps();
|
List<Mindmap> getAllMindmaps();
|
||||||
|
|
||||||
|
@Nullable
|
||||||
Mindmap getMindmapById(int mindmapId);
|
Mindmap getMindmapById(int mindmapId);
|
||||||
|
|
||||||
Mindmap getMindmapByTitle(final String name, final User user);
|
Mindmap getMindmapByTitle(final String name, final User user);
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
package com.wisemapping.view;
|
package com.wisemapping.view;
|
||||||
|
|
||||||
|
import com.wisemapping.exceptions.AccessDeniedSecurityException;
|
||||||
import com.wisemapping.exceptions.WiseMappingException;
|
import com.wisemapping.exceptions.WiseMappingException;
|
||||||
import com.wisemapping.model.*;
|
import com.wisemapping.model.*;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
@ -126,14 +127,22 @@ public class MindMapBean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getProperties() throws WiseMappingException {
|
public String getProperties() throws WiseMappingException {
|
||||||
String result;
|
String result = null;
|
||||||
|
|
||||||
if (collaborator != null) {
|
if (collaborator != null) {
|
||||||
final CollaborationProperties properties = this.mindmap.findCollaborationProperties(collaborator);
|
try {
|
||||||
result = properties.getMindmapProperties();
|
final CollaborationProperties properties = this.mindmap.findCollaborationProperties(collaborator);
|
||||||
} else {
|
result = properties.getMindmapProperties();
|
||||||
|
} catch (AccessDeniedSecurityException e) {
|
||||||
|
// Ignore exception. This is required for the admin could view maps ...
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result == null) {
|
||||||
// It must be public view ...
|
// It must be public view ...
|
||||||
result = CollaborationProperties.DEFAULT_JSON_PROPERTIES;
|
result = CollaborationProperties.DEFAULT_JSON_PROPERTIES;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user