From 3a006f1fbc8fba64efcc8d3f61940608d8d7a7c5 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 22 Nov 2020 12:53:35 -0800 Subject: [PATCH] Fix error on mindmap publish & details --- .../src/main/java/com/wisemapping/model/Mindmap.java | 6 ++++++ .../security/DefaultPasswordEncoderFactories.java | 1 - .../src/main/java/com/wisemapping/view/MindMapBean.java | 6 ++++++ wise-webapp/src/main/webapp/jsp/mindmapDetail.jsp | 2 +- wise-webapp/src/main/webapp/jsp/mindmapPublish.jsp | 3 ++- 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java b/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java index 7523bada..7ddeff07 100644 --- a/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/Mindmap.java @@ -160,6 +160,12 @@ public class Mindmap { return isPublic; } + //@Todo: This is a hack to overcome some problem with JS EL. For some reason, ${mindmap.public} fails as not supported. + // More research is needed... + public boolean isAccessible() { + return isPublic(); + } + public void setPublic(boolean isPublic) { this.isPublic = isPublic; } diff --git a/wise-webapp/src/main/java/com/wisemapping/security/DefaultPasswordEncoderFactories.java b/wise-webapp/src/main/java/com/wisemapping/security/DefaultPasswordEncoderFactories.java index 3d07c04d..1c5eeced 100644 --- a/wise-webapp/src/main/java/com/wisemapping/security/DefaultPasswordEncoderFactories.java +++ b/wise-webapp/src/main/java/com/wisemapping/security/DefaultPasswordEncoderFactories.java @@ -11,7 +11,6 @@ public class DefaultPasswordEncoderFactories { private static final String ENCODING_ID = "bcrypt"; - @SuppressWarnings("deprecation") static PasswordEncoder createDelegatingPasswordEncoder() { final Map encoders = new HashMap<>(); diff --git a/wise-webapp/src/main/java/com/wisemapping/view/MindMapBean.java b/wise-webapp/src/main/java/com/wisemapping/view/MindMapBean.java index 70a17740..8608450a 100644 --- a/wise-webapp/src/main/java/com/wisemapping/view/MindMapBean.java +++ b/wise-webapp/src/main/java/com/wisemapping/view/MindMapBean.java @@ -47,6 +47,12 @@ public class MindMapBean { return mindmap.isPublic(); } + //@Todo: This is a hack to overcome some problem with JS EL. For some reason, ${mindmap.public} fails as not supported. + // More research is needed... + public boolean isAccessible() { + return getPublic(); + } + public String getTitle() { return mindmap.getTitle(); } diff --git a/wise-webapp/src/main/webapp/jsp/mindmapDetail.jsp b/wise-webapp/src/main/webapp/jsp/mindmapDetail.jsp index 4be8bd3f..96edd0cf 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapDetail.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapDetail.jsp @@ -45,7 +45,7 @@
- +

  • diff --git a/wise-webapp/src/main/webapp/jsp/mindmapPublish.jsp b/wise-webapp/src/main/webapp/jsp/mindmapPublish.jsp index 20abea39..fdda9fd6 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapPublish.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapPublish.jsp @@ -11,7 +11,7 @@
    @@ -28,6 +28,7 @@

+