mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 14:17:57 +01: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 org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -37,6 +38,7 @@ public interface MindmapManager {
|
||||
|
||||
List<Mindmap> getAllMindmaps();
|
||||
|
||||
@Nullable
|
||||
Mindmap getMindmapById(int mindmapId);
|
||||
|
||||
Mindmap getMindmapByTitle(final String name, final User user);
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
package com.wisemapping.view;
|
||||
|
||||
import com.wisemapping.exceptions.AccessDeniedSecurityException;
|
||||
import com.wisemapping.exceptions.WiseMappingException;
|
||||
import com.wisemapping.model.*;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@ -126,14 +127,22 @@ public class MindMapBean {
|
||||
}
|
||||
|
||||
public String getProperties() throws WiseMappingException {
|
||||
String result;
|
||||
String result = null;
|
||||
|
||||
if (collaborator != null) {
|
||||
final CollaborationProperties properties = this.mindmap.findCollaborationProperties(collaborator);
|
||||
result = properties.getMindmapProperties();
|
||||
} else {
|
||||
try {
|
||||
final CollaborationProperties properties = this.mindmap.findCollaborationProperties(collaborator);
|
||||
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 ...
|
||||
result = CollaborationProperties.DEFAULT_JSON_PROPERTIES;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user