From dd8e9e2f5d8f4afb71b0981a9e87987d638e5a56 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Wed, 23 Feb 2022 07:11:13 -0800 Subject: [PATCH 01/27] Bump up version --- pom.xml | 2 +- wise-ui/pom.xml | 2 +- wise-webapp/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 48417bbb..29e09181 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ org.wisemapping wisemapping WiseMapping Project - 5.0.7 + 5.0.8-SNAPSHOT pom diff --git a/wise-ui/pom.xml b/wise-ui/pom.xml index 75b17e66..7a08d1eb 100644 --- a/wise-ui/pom.xml +++ b/wise-ui/pom.xml @@ -12,7 +12,7 @@ org.wisemapping wisemapping ../pom.xml - 5.0.7 + 5.0.8-SNAPSHOT diff --git a/wise-webapp/pom.xml b/wise-webapp/pom.xml index 86fa1ec7..bae9a916 100644 --- a/wise-webapp/pom.xml +++ b/wise-webapp/pom.xml @@ -9,7 +9,7 @@ org.wisemapping wisemapping ../pom.xml - 5.0.7 + 5.0.8-SNAPSHOT From 31980ca444129202a0e45a2ec736c02f8270fd7d Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Wed, 23 Feb 2022 07:16:07 -0800 Subject: [PATCH 02/27] Fix version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 29e09181..c76fba47 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> - 5.0.7 + 5.0.8-SNAPSHOT ${project.basedir}/wise-webapps From 5bb6f199c31d6bfce4a2eefb5853847a9086c70c Mon Sep 17 00:00:00 2001 From: Paulo Veiga Date: Wed, 23 Feb 2022 15:39:06 +0000 Subject: [PATCH 03/27] README.md edited online with Bitbucket --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index de5f7cb9..036e90ee 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ The following products must be installed: * OpenJDK 11 or higher * Maven 3.x or higher ([http://maven.apache.org/]) + * npm 6 or higher ([https://www.npmjs.com/package/npm?activeTab=versions]) ### Compiling From 50fa9d80f5c3b517f08cc5d6fb680312d0bbd4fc Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Wed, 23 Feb 2022 09:51:02 -0800 Subject: [PATCH 04/27] Improve error message --- .../com/wisemapping/exceptions/InvalidMindmapException.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/exceptions/InvalidMindmapException.java b/wise-webapp/src/main/java/com/wisemapping/exceptions/InvalidMindmapException.java index 8f0b9939..f2978b64 100755 --- a/wise-webapp/src/main/java/com/wisemapping/exceptions/InvalidMindmapException.java +++ b/wise-webapp/src/main/java/com/wisemapping/exceptions/InvalidMindmapException.java @@ -37,7 +37,7 @@ public class InvalidMindmapException } static public InvalidMindmapException emptyMindmap() { - return new InvalidMindmapException(EMPTY_MINDMAP,""); + return new InvalidMindmapException(EMPTY_MINDMAP,""); } static public InvalidMindmapException invalidFormat(@Nullable String xmlDoc) { @@ -45,7 +45,7 @@ public class InvalidMindmapException } static public InvalidMindmapException tooBigMindnap() { - return new InvalidMindmapException(TOO_BIG_MINDMAP,""); + return new InvalidMindmapException(TOO_BIG_MINDMAP,""); } @NotNull From c3be0b65521c1630cc41c2611497ba733872aa8d Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Wed, 23 Feb 2022 14:34:55 -0800 Subject: [PATCH 05/27] Increase number of nodes supported. --- .../wisemapping/exceptions/InvalidMindmapException.java | 8 ++++---- .../src/main/java/com/wisemapping/model/MindmapUtils.java | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/exceptions/InvalidMindmapException.java b/wise-webapp/src/main/java/com/wisemapping/exceptions/InvalidMindmapException.java index f2978b64..43fb75d1 100755 --- a/wise-webapp/src/main/java/com/wisemapping/exceptions/InvalidMindmapException.java +++ b/wise-webapp/src/main/java/com/wisemapping/exceptions/InvalidMindmapException.java @@ -37,15 +37,15 @@ public class InvalidMindmapException } static public InvalidMindmapException emptyMindmap() { - return new InvalidMindmapException(EMPTY_MINDMAP,""); + return new InvalidMindmapException(EMPTY_MINDMAP, ""); } static public InvalidMindmapException invalidFormat(@Nullable String xmlDoc) { - return new InvalidMindmapException(INVALID_MINDMAP_FORMAT,xmlDoc); + return new InvalidMindmapException(INVALID_MINDMAP_FORMAT, xmlDoc); } - static public InvalidMindmapException tooBigMindnap() { - return new InvalidMindmapException(TOO_BIG_MINDMAP,""); + static public InvalidMindmapException tooBigMindnap(int numberOfTopics) { + return new InvalidMindmapException(TOO_BIG_MINDMAP, ""); } @NotNull diff --git a/wise-webapp/src/main/java/com/wisemapping/model/MindmapUtils.java b/wise-webapp/src/main/java/com/wisemapping/model/MindmapUtils.java index a39508f3..7b5fd5c8 100644 --- a/wise-webapp/src/main/java/com/wisemapping/model/MindmapUtils.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/MindmapUtils.java @@ -6,7 +6,7 @@ import org.jetbrains.annotations.Nullable; abstract public class MindmapUtils { - private static final int MAX_SUPPORTED_NODES = 500; + private static final int MAX_SUPPORTED_NODES = 1000; public static void verifyMindmap(@Nullable String xmlDoc) throws InvalidMindmapException { if (xmlDoc == null || xmlDoc.trim().isEmpty()) { @@ -20,8 +20,9 @@ abstract public class MindmapUtils { } // Validate that the number of nodes is not bigger 500 nodes. - if (xmlDoc.split(" MAX_SUPPORTED_NODES) { - throw InvalidMindmapException.tooBigMindnap(); + int numberOfTopics = xmlDoc.split(" MAX_SUPPORTED_NODES) { + throw InvalidMindmapException.tooBigMindnap(numberOfTopics); } } } From 8b61809bbe4aafe7fba9253b0fe1bc891db8cb9c Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Wed, 23 Feb 2022 16:36:08 -0800 Subject: [PATCH 06/27] Fix css location for bootstrap --- wise-webapp/src/main/webapp/css/viewonly.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wise-webapp/src/main/webapp/css/viewonly.css b/wise-webapp/src/main/webapp/css/viewonly.css index bf5f9dd5..ebbcf0dd 100644 --- a/wise-webapp/src/main/webapp/css/viewonly.css +++ b/wise-webapp/src/main/webapp/css/viewonly.css @@ -1,7 +1,7 @@ /********************************************************************************/ /* Header & Toolbar Styles */ /********************************************************************************/ -@import "../bootstrap/css/bootstrap.min.css"; +@import "bootstrap.min.css"; body { margin: 0; font-family:Arial; From 6892732389cd7495660f219e5065f0fb9db11ffc Mon Sep 17 00:00:00 2001 From: polly good Date: Fri, 25 Feb 2022 00:45:12 +0000 Subject: [PATCH 07/27] Merged in ru-locale (pull request #11) messages_ru.properties * messages_ru.properties Approved-by: Paulo Veiga --- .../src/main/resources/messages_ru.properties | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 wise-webapp/src/main/resources/messages_ru.properties diff --git a/wise-webapp/src/main/resources/messages_ru.properties b/wise-webapp/src/main/resources/messages_ru.properties new file mode 100644 index 00000000..0c122588 --- /dev/null +++ b/wise-webapp/src/main/resources/messages_ru.properties @@ -0,0 +1,58 @@ +# Default English Support. +DESCRIPTION = Описание +SITE.TITLE = WiseMapping +FIELD_REQUIRED = Это поле обязательно для заполненияю +EMAIL_ALREADY_EXIST = Аккаунт с таким e-mail уже существует. +NO_VALID_EMAIL_ADDRESS = Некорректный адрес электронной почты. +PASSWORD_MISMATCH = Пароли не совпадают +CREATOR = Создатель +WELCOME = Добро пожаловать +SHARE = Поделиться +UNEXPECTED_ERROR = Что-то пошло не так. +MAP_TITLE_ALREADY_EXISTS = Карта с таким именем уже существует +LABEL_TITLE_ALREADY_EXISTS = Метка с таким именем уже существует +TUTORIAL.MULTIPLE_TEXT_STYLES = Разные стили текста +TUTORIAL.DIFFERENT_SHAPES = Разные Формы +TUTORIAL.FANCY_ICONS = Симпатичные Иконки +TUTORIAL.MOVE_WITH_ARROWS = Перемещение по карте стрелками +TUTORIAL.START_TYPING_TO_EDIT_TEXT = Начните печатать, чтобы отредактировать +TUTORIAL.CTRL_TO_ADD_CHILD = Ctrl/Meta+Enter чтобы добавить подтему +TUTORIAL.ENTER_TO_ADD_SIBLING = Enter чтобы добавить тему того же уровне +TUTORIAL.MORE_KEY_TIPS = А еще ?. Нажми на Shortcuts ниже +TUTORIAL.DOUBLE_CLICK_TO_ADD = Для создания темы - двойной клик по холсту +TUTORIAL.DRAG_AND_DROP_TO_POSITION = Темы и ветки можно перетаскивать +TUTORIAL.DOUBLE_CLICK_TO_EDIT_TEXT = Двойной клик - редактирование темы +TUTORIAL.ADD_NOTES = Добавление заметок +TUTORIAL.USER_THE_TOOLBAR = Панель инструметов +TUTORIAL.PUBLISH_YOUR_MAPS = Публикация своих майнд-карты +TUTORIAL.EMBED_IN_BLOGS = Возможность встроить в блог +TUTORIAL.INVITE_FRIEND = Пригласи друзей +TUTORIAL.SHARING = Доступ +TUTORIAL.EDITION_USING_MOUSE = Редактирование мышью +TUTORIAL.EDITION_USING_KEYBOARD = Редактирование с клавиатуры +TUTORIAL.ADD_LINKS_WEBPAGES = Добавление ссылок на веб-страницы +TUTORIAL.TOPIC_PROPERTIES = Свойства темы +TUTORIAL.HOW_TO_START = Как начать ? +TUTORIAL.FONT_COLOR = Цвет +TUTORIAL.FONT_STYLE = Стили +TUTORIAL.FONT_TYPE = Type +TUTORIAL.SAMPLE_NOTE = Это просто заметка\!. +CAPTCHA_LOADING_ERROR = ReCaptcha не загружается. Должен быть доступ к сервису Google ReCaptcha. +ACCESS_HAS_BEEN_REVOKED = Ваш доступ к карте был отозван. Обратитесь к владельцу. +MAP_CAN_NOT_BE_FOUND = Карта не найдена. Вероятно, она удалена. +LABEL_CAN_NOT_BE_FOUND = Метка не найдена. Вероятно, она удалена. +MINDMAP_TIMESTAMP_OUTDATED = Невозможно сохранить, карта была изменена ''{0}''. Обновите страницу и попробуйте еще раз. +MINDMAP_OUTDATED_BY_YOU = Невозможно сохранить - карта устарела. У вас открыто несколько вкладок браузера?. Обновите страницу и попробуйте еще раз. +MINDMAP_LOCKED = Карта редактируется {0} <{1}>. Карта открыта в режиме чтения. +MINDMAP_IS_LOCKED = Карта доступна только для просмотра. +# Confirmed +RESET_PASSWORD_INVALID_EMAIL = Указанный адрес не связан с аккаунтом пользователя. Укажите корректный адрес. +TRY_WELCOME = Здесь можно ознакомиться с возможностями нашего редактора майнд-карт на примерах и практике \!. +UNEXPECTED_ERROR_DETAILS = Что-то пошло не так при обработке запроса. +NO_ENOUGH_PERMISSIONS=Эта майнд-карта недоступна. +NO_ENOUGH_PERMISSIONS_DETAILS=У вас нет доступа к этой карте. Карта либо удалена, либо стала приватной. +CAPTCHA_TIMEOUT_OUT_DUPLICATE=Пожалуйста, обновите страницу и повторите попытку. +CAPTCHA_INVALID_INPUT_RESPONSE="Неверная CAPTCHA, обновите страницу и повторите попытку. +MINDMAP_EMPTY_ERROR=Карта не может быть пустой. +INVALID_MINDMAP_FORMAT=Недопустимый формат карты. +TOO_BIG_MINDMAP= Слишком большая карта - вы достигли лимита в 500 тем. From 194e858191e33e7d168a7d497da476b7b9bd64b2 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Fri, 25 Feb 2022 06:23:52 -0800 Subject: [PATCH 08/27] Bump up size limit --- .../src/main/java/com/wisemapping/model/MindmapUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/model/MindmapUtils.java b/wise-webapp/src/main/java/com/wisemapping/model/MindmapUtils.java index 7b5fd5c8..9a519d4e 100644 --- a/wise-webapp/src/main/java/com/wisemapping/model/MindmapUtils.java +++ b/wise-webapp/src/main/java/com/wisemapping/model/MindmapUtils.java @@ -6,7 +6,7 @@ import org.jetbrains.annotations.Nullable; abstract public class MindmapUtils { - private static final int MAX_SUPPORTED_NODES = 1000; + private static final int MAX_SUPPORTED_NODES = 4000; public static void verifyMindmap(@Nullable String xmlDoc) throws InvalidMindmapException { if (xmlDoc == null || xmlDoc.trim().isEmpty()) { From 5cdf2d6de2dea11302222b12f4b4070f62f3e6fd Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Fri, 25 Feb 2022 20:23:01 -0800 Subject: [PATCH 09/27] Bump up version --- wise-ui/pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wise-ui/pom.xml b/wise-ui/pom.xml index 7a08d1eb..61e52fc5 100644 --- a/wise-ui/pom.xml +++ b/wise-ui/pom.xml @@ -29,11 +29,11 @@ - + - + @@ -42,11 +42,11 @@ - + - + From 402393a9f70f9289960107221e25ae579e3d7945 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 27 Feb 2022 09:02:41 -0800 Subject: [PATCH 10/27] Enable tomcat redirect filter --- distribution/Dockerfile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/distribution/Dockerfile b/distribution/Dockerfile index db3f3267..8a4c2427 100644 --- a/distribution/Dockerfile +++ b/distribution/Dockerfile @@ -9,8 +9,8 @@ LABEL maintainer="Paulo Gustavo Veiga " ARG WEBAPP_TARGET_DIR="/usr/local/tomcat/webapps/ROOT" ARG DB_BASE_DIR="/var/lib/wisemapping" -# Defautl ENV configurations ... -ENV JAVA_OPTS="-XX:+PrintFlagsFinal -XX:InitialRAMPercentage=30 -XX:MaxRAMPercentage=80 -javaagent:/opt/newrelic/newrelic.jar" +# Default ENV configurations ... +ENV JAVA_OPTS="-XX:+PrintFlagsFinal -XX:InitialRAMPercentage=30 -XX:MaxRAMPercentage=80" ENV database.base.url=${DB_BASE_DIR} # Copy wisemapping distribution ... @@ -22,6 +22,15 @@ RUN rm /tmp/wisemapping.war # Change logger to RUN cp ${WEBAPP_TARGET_DIR}/WEB-INF/classes/log4j-stdout.properties ${WEBAPP_TARGET_DIR}/WEB-INF/classes/log4j.properties +# Add support for proxy +RUN sed -i 's|\ + |\ + \ + |' \ + /usr/local/tomcat/conf/server.xml + # Copy default HSQL DB for testing ... RUN mkdir -p ${DB_BASE_DIR}/db COPY db/ ${DB_BASE_DIR}/db From 82a3e1c793bb37342153e69bef03376d20b070e9 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 27 Feb 2022 09:14:30 -0800 Subject: [PATCH 11/27] Extract new relic config --- distribution/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribution/Dockerfile b/distribution/Dockerfile index 8a4c2427..2f10598e 100644 --- a/distribution/Dockerfile +++ b/distribution/Dockerfile @@ -10,7 +10,7 @@ ARG WEBAPP_TARGET_DIR="/usr/local/tomcat/webapps/ROOT" ARG DB_BASE_DIR="/var/lib/wisemapping" # Default ENV configurations ... -ENV JAVA_OPTS="-XX:+PrintFlagsFinal -XX:InitialRAMPercentage=30 -XX:MaxRAMPercentage=80" +ENV JAVA_OPTS="-XX:+PrintFlagsFinal -XX:InitialRAMPercentage=30 -XX:MaxRAMPercentage=80 ${JAVA_OPS_EXT}" ENV database.base.url=${DB_BASE_DIR} # Copy wisemapping distribution ... From b60f5b331f9a09e48a75ecf3465fa325cfb63ced Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 27 Feb 2022 09:59:03 -0800 Subject: [PATCH 12/27] Disable remember me until solve too many redirect problem. --- wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml index 83f7a395..e98ff11a 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml @@ -53,7 +53,7 @@ - + - + From 732127a7a93f625294fcf1fece75ceafd746a837 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 27 Feb 2022 13:11:55 -0800 Subject: [PATCH 13/27] Fix to many redirects on remember me --- .../main/java/com/wisemapping/webmvc/UsersController.java | 3 --- wise-webapp/src/main/webapp/WEB-INF/defs/definitions.xml | 1 - .../src/main/webapp/WEB-INF/wisemapping-security.xml | 6 +++--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/webmvc/UsersController.java b/wise-webapp/src/main/java/com/wisemapping/webmvc/UsersController.java index 81264c38..d21768a2 100644 --- a/wise-webapp/src/main/java/com/wisemapping/webmvc/UsersController.java +++ b/wise-webapp/src/main/java/com/wisemapping/webmvc/UsersController.java @@ -19,13 +19,10 @@ package com.wisemapping.webmvc; -import com.wisemapping.security.Utils; import com.wisemapping.service.UserService; -import org.jetbrains.annotations.NotNull; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Controller; -import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.servlet.ModelAndView; diff --git a/wise-webapp/src/main/webapp/WEB-INF/defs/definitions.xml b/wise-webapp/src/main/webapp/WEB-INF/defs/definitions.xml index 3661cccb..805880c2 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/defs/definitions.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/defs/definitions.xml @@ -2,7 +2,6 @@ - diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml index e98ff11a..b1fb5d4c 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml @@ -46,14 +46,14 @@ - + - + - + From 67cc7e586cc8b4f5fe9899e83116a326fc8cbfc3 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 27 Feb 2022 13:16:39 -0800 Subject: [PATCH 14/27] Rember me redirect on maps on login --- wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml index b1fb5d4c..abdb55e5 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml @@ -61,7 +61,9 @@ login-processing-url="/c/perform-login"/> - + From 8d5245da5a0999ac0ce26e4334861d73843b7a26 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 27 Feb 2022 15:02:18 -0800 Subject: [PATCH 15/27] Fix typo --- distribution/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribution/Dockerfile b/distribution/Dockerfile index 2f10598e..ab9387e2 100644 --- a/distribution/Dockerfile +++ b/distribution/Dockerfile @@ -10,7 +10,7 @@ ARG WEBAPP_TARGET_DIR="/usr/local/tomcat/webapps/ROOT" ARG DB_BASE_DIR="/var/lib/wisemapping" # Default ENV configurations ... -ENV JAVA_OPTS="-XX:+PrintFlagsFinal -XX:InitialRAMPercentage=30 -XX:MaxRAMPercentage=80 ${JAVA_OPS_EXT}" +ENV JAVA_OPTS="-XX:+PrintFlagsFinal -XX:InitialRAMPercentage=30 -XX:MaxRAMPercentage=80 ${JAVA_OPTS_EXT}" ENV database.base.url=${DB_BASE_DIR} # Copy wisemapping distribution ... From a8e2c74a21a10392ec224cbbce2c61d41e955463 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Mon, 28 Feb 2022 14:51:25 -0800 Subject: [PATCH 16/27] Remove homepage --- .../webmvc/PublicPagesController.java | 31 ------------------- .../src/main/webapp/WEB-INF/app.properties | 2 +- .../webapp/WEB-INF/wisemapping-security.xml | 4 +-- 3 files changed, 2 insertions(+), 35 deletions(-) delete mode 100644 wise-webapp/src/main/java/com/wisemapping/webmvc/PublicPagesController.java diff --git a/wise-webapp/src/main/java/com/wisemapping/webmvc/PublicPagesController.java b/wise-webapp/src/main/java/com/wisemapping/webmvc/PublicPagesController.java deleted file mode 100644 index f65cb811..00000000 --- a/wise-webapp/src/main/java/com/wisemapping/webmvc/PublicPagesController.java +++ /dev/null @@ -1,31 +0,0 @@ -/* -* Copyright [2015] [wisemapping] -* -* Licensed under WiseMapping Public License, Version 1.0 (the "License"). -* It is basically the Apache License, Version 2.0 (the "License") plus the -* "powered by wisemapping" text requirement on every single page; -* you may not use this file except in compliance with the License. -* You may obtain a copy of the license at -* -* http://www.wisemapping.org/license -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -package com.wisemapping.webmvc; - -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; - -@Controller -public class PublicPagesController { - - @RequestMapping(value = "home") - public String home() { - return "homepage"; - } -} diff --git a/wise-webapp/src/main/webapp/WEB-INF/app.properties b/wise-webapp/src/main/webapp/WEB-INF/app.properties index bee03463..846700d5 100755 --- a/wise-webapp/src/main/webapp/WEB-INF/app.properties +++ b/wise-webapp/src/main/webapp/WEB-INF/app.properties @@ -94,7 +94,7 @@ admin.user = admin@wisemapping.org # Site Homepage URL. This will be used as URL for homepage location. -site.homepage = c/home +site.homepage = c/login # Font end static content can be deployed externally to the web app. Uncomment here and specify the url base location. site.static.js.url = /static diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml index abdb55e5..5f23acc0 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml @@ -18,9 +18,7 @@ - - - + From e0dac738739f4cc5e7a507ed0bbef60230dd6f40 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Mon, 28 Feb 2022 21:12:28 -0800 Subject: [PATCH 17/27] Fix NPE on null user. --- .../src/main/java/com/wisemapping/rest/MindmapController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java index c87a567d..d8d8222d 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java @@ -542,7 +542,7 @@ public class MindmapController extends BaseController { mindmap.setXmlStr(mapXml); // Add new mindmap ... - final User user = Utils.getUser(); + final User user = Utils.getUser(true); mindmapService.addMindmap(mindmap, user); // Return the new created map ... From f5fabae644332f48d96f4949033613188cbfd502 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Mon, 28 Feb 2022 21:17:21 -0800 Subject: [PATCH 18/27] Clean up JAVA_OPTS variable --- distribution/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribution/Dockerfile b/distribution/Dockerfile index ab9387e2..8a4c2427 100644 --- a/distribution/Dockerfile +++ b/distribution/Dockerfile @@ -10,7 +10,7 @@ ARG WEBAPP_TARGET_DIR="/usr/local/tomcat/webapps/ROOT" ARG DB_BASE_DIR="/var/lib/wisemapping" # Default ENV configurations ... -ENV JAVA_OPTS="-XX:+PrintFlagsFinal -XX:InitialRAMPercentage=30 -XX:MaxRAMPercentage=80 ${JAVA_OPTS_EXT}" +ENV JAVA_OPTS="-XX:+PrintFlagsFinal -XX:InitialRAMPercentage=30 -XX:MaxRAMPercentage=80" ENV database.base.url=${DB_BASE_DIR} # Copy wisemapping distribution ... From 1acf84de3f6f45f7421a700385b6541ab32f7885 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 6 Mar 2022 20:16:48 -0800 Subject: [PATCH 19/27] Add anonymous to js loading --- wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp | 4 ++-- wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp | 2 +- wise-webapp/src/main/webapp/jsp/reactInclude.jsp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp b/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp index f02cc9b2..fe9613de 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp @@ -48,8 +48,8 @@
- - + + diff --git a/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp b/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp index 6704ed95..52e71778 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp @@ -35,7 +35,7 @@ :${mindmap.title} - +
diff --git a/wise-webapp/src/main/webapp/jsp/reactInclude.jsp b/wise-webapp/src/main/webapp/jsp/reactInclude.jsp index 4285c266..75dbd7bf 100644 --- a/wise-webapp/src/main/webapp/jsp/reactInclude.jsp +++ b/wise-webapp/src/main/webapp/jsp/reactInclude.jsp @@ -32,8 +32,8 @@
- - + + From 5c201d40df8953c10fd4f89f58379b9aa3473121 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 6 Mar 2022 20:47:45 -0800 Subject: [PATCH 20/27] Git add CORS --- wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml index 62da4794..362c0980 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml @@ -22,6 +22,11 @@ + + + + From 297931508a4973b75f10ec17286f21a976d0c4cf Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 6 Mar 2022 21:10:45 -0800 Subject: [PATCH 21/27] Add header changes on cors --- .../webapp/WEB-INF/wisemapping-security.xml | 22 +++++++++++++++++-- .../webapp/WEB-INF/wisemapping-servlet.xml | 2 +- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml index 5f23acc0..ce3e15f8 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml @@ -3,10 +3,14 @@ + http://www.springframework.org/schema/security/spring-security.xsd + http://www.springframework.org/schema/util + http://www.springframework.org/schema/util/spring-util.xsd" +> @@ -18,7 +22,7 @@ - + @@ -43,6 +47,8 @@ + + @@ -83,4 +89,16 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml index 362c0980..62ce1e99 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml @@ -23,7 +23,7 @@ - From ffd976ffe5c1218af33f49a7c401d4144f644788 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 6 Mar 2022 21:26:54 -0800 Subject: [PATCH 22/27] Revert "Add header changes on cors" This reverts commit 297931508a4973b75f10ec17286f21a976d0c4cf. --- .../webapp/WEB-INF/wisemapping-security.xml | 22 ++----------------- .../webapp/WEB-INF/wisemapping-servlet.xml | 2 +- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml index ce3e15f8..5f23acc0 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml @@ -3,14 +3,10 @@ + http://www.springframework.org/schema/security/spring-security.xsd"> @@ -22,7 +18,7 @@ - + @@ -47,8 +43,6 @@ - - @@ -89,16 +83,4 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml index 62ce1e99..362c0980 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml @@ -23,7 +23,7 @@ - From d0a03ad2a3d61cfae087951a3cc57b8b2341e58f Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 6 Mar 2022 21:27:06 -0800 Subject: [PATCH 23/27] Revert "Git add CORS" This reverts commit 5c201d40df8953c10fd4f89f58379b9aa3473121. --- wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml index 362c0980..62da4794 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml @@ -22,11 +22,6 @@ - - - - From d217768b83946d47d10b24305baf36e63a809940 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Wed, 9 Mar 2022 13:24:41 -0800 Subject: [PATCH 24/27] Remove unused context variables. --- .../src/main/java/com/wisemapping/webmvc/MindmapController.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/webmvc/MindmapController.java b/wise-webapp/src/main/java/com/wisemapping/webmvc/MindmapController.java index 011f5eb9..f517df48 100644 --- a/wise-webapp/src/main/java/com/wisemapping/webmvc/MindmapController.java +++ b/wise-webapp/src/main/java/com/wisemapping/webmvc/MindmapController.java @@ -83,7 +83,6 @@ public class MindmapController { if (!readOnlyMode) { final LockManager lockManager = this.mindmapService.getLockManager(); if (lockManager.isLocked(mindmap) && !lockManager.isLockedBy(mindmap, collaborator)) { - readOnlyMode = true; isLocked = true; } else { model.addAttribute("lockTimestamp", mindmap.getLastModificationTime().getTimeInMillis()); @@ -97,7 +96,6 @@ public class MindmapController { // Configure default locale for the editor ... model.addAttribute("locale", locale.toString().toLowerCase()); model.addAttribute("principal", collaborator); - model.addAttribute("readOnlyMode", readOnlyMode); model.addAttribute("memoryPersistence", false); model.addAttribute("mindmapLocked", isLocked); From 5694697c5f07af963e462eb711296d16aad6c164 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Wed, 9 Mar 2022 17:18:14 -0800 Subject: [PATCH 25/27] Improve exception handling on non permissions --- .../com/wisemapping/webmvc/MindmapController.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/webmvc/MindmapController.java b/wise-webapp/src/main/java/com/wisemapping/webmvc/MindmapController.java index f517df48..e38dc9c5 100644 --- a/wise-webapp/src/main/java/com/wisemapping/webmvc/MindmapController.java +++ b/wise-webapp/src/main/java/com/wisemapping/webmvc/MindmapController.java @@ -19,6 +19,7 @@ package com.wisemapping.webmvc; +import com.wisemapping.exceptions.AccessDeniedSecurityException; import com.wisemapping.exceptions.MapCouldNotFoundException; import com.wisemapping.exceptions.MapNonPublicException; import com.wisemapping.exceptions.WiseMappingException; @@ -52,7 +53,8 @@ public class MindmapController { private MindmapService mindmapService; @RequestMapping(value = "maps/{id}/print") - public String showPrintPage(@PathVariable int id, @NotNull Model model) throws MapCouldNotFoundException { + public String showPrintPage(@PathVariable int id, @NotNull Model model) throws MapCouldNotFoundException, AccessDeniedSecurityException { + final MindMapBean mindmap = findMindmapBean(id); model.addAttribute("principal", Utils.getUser()); model.addAttribute("mindmap", mindmap); @@ -127,7 +129,7 @@ public class MindmapController { } @RequestMapping(value = "maps/{id}/embed") - public ModelAndView showEmbeddedPage(@PathVariable int id, @RequestParam(required = false) Float zoom) throws MapCouldNotFoundException, MapNonPublicException { + public ModelAndView showEmbeddedPage(@PathVariable int id, @RequestParam(required = false) Float zoom) throws MapCouldNotFoundException, MapNonPublicException, AccessDeniedSecurityException { if (!mindmapService.isMindmapPublic(id)) { throw new MapNonPublicException("Map " + id + " is not public."); } @@ -171,7 +173,12 @@ public class MindmapController { } @NotNull - private MindMapBean findMindmapBean(int mapId) throws MapCouldNotFoundException { + private MindMapBean findMindmapBean(int mapId) throws MapCouldNotFoundException, AccessDeniedSecurityException { + final User user = Utils.getUser(); + if (!mindmapService.hasPermissions(user, mapId, CollaborationRole.VIEWER)) { + throw new AccessDeniedSecurityException("No enough permissions to open map with id" + mapId); + } + final Mindmap mindmap = findMindmap(mapId); return new MindMapBean(mindmap, Utils.getUser()); } From c68c43f5d7f70bdcd651398bb311e336f3735baf Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 13 Mar 2022 23:08:19 -0300 Subject: [PATCH 26/27] Add chinese support --- .../src/main/resources/messages_zh.properties | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 wise-webapp/src/main/resources/messages_zh.properties diff --git a/wise-webapp/src/main/resources/messages_zh.properties b/wise-webapp/src/main/resources/messages_zh.properties new file mode 100644 index 00000000..d4b5bf90 --- /dev/null +++ b/wise-webapp/src/main/resources/messages_zh.properties @@ -0,0 +1,58 @@ +# Default English Support. +DESCRIPTION = 描述 +SITE.TITLE = WiseMapping +FIELD_REQUIRED = 必填字段不能为空 +EMAIL_ALREADY_EXIST = 已经有一个账号使用此电子邮件。 +NO_VALID_EMAIL_ADDRESS = 无效的电子邮件地址 +PASSWORD_MISMATCH = 您输入的密码不一致 +CREATOR = 创建人 +WELCOME = 欢迎 +SHARE = 分享 +UNEXPECTED_ERROR = 发生了意外错误。 +MAP_TITLE_ALREADY_EXISTS = 你已经有同名脑图了 +LABEL_TITLE_ALREADY_EXISTS = 你已经有一个同名的标签了 +TUTORIAL.MULTIPLE_TEXT_STYLES = 多种文本样式 +TUTORIAL.DIFFERENT_SHAPES = 不同形状 +TUTORIAL.FANCY_ICONS = 炫酷图标 +TUTORIAL.MOVE_WITH_ARROWS = 使用方向键在主题之间移动 +TUTORIAL.START_TYPING_TO_EDIT_TEXT = 开始键入编辑文本 +TUTORIAL.CTRL_TO_ADD_CHILD = 按Ctrl/Meta+Enter添加子主题 +TUTORIAL.ENTER_TO_ADD_SIBLING = 按回车键添加并行主题 +TUTORIAL.MORE_KEY_TIPS = 更多?点击上面的快捷方式 +TUTORIAL.DOUBLE_CLICK_TO_ADD = 双击画布创建主题 +TUTORIAL.DRAG_AND_DROP_TO_POSITION = 拖放主题位置 +TUTORIAL.DOUBLE_CLICK_TO_EDIT_TEXT = 双击主题编辑文本 +TUTORIAL.ADD_NOTES = 添加注释 +TUTORIAL.USER_THE_TOOLBAR = 使用工具栏 +TUTORIAL.PUBLISH_YOUR_MAPS = 发布你的思维导图 +TUTORIAL.EMBED_IN_BLOGS = 嵌入博客 +TUTORIAL.INVITE_FRIEND = 邀请朋友协作 +TUTORIAL.SHARING = 分享 +TUTORIAL.EDITION_USING_MOUSE = 使用鼠标编辑 +TUTORIAL.EDITION_USING_KEYBOARD = 使用键盘编辑 +TUTORIAL.ADD_LINKS_WEBPAGES = 添加网页链接 +TUTORIAL.TOPIC_PROPERTIES = 主题属性 +TUTORIAL.HOW_TO_START = 如何开始? +TUTORIAL.FONT_COLOR = 颜色 +TUTORIAL.FONT_STYLE = 样式 +TUTORIAL.FONT_TYPE = 类型 +TUTORIAL.SAMPLE_NOTE = 这是一个简单的注释\!。 +CAPTCHA_LOADING_ERROR = 无法加载ReCaptcha。您必须能够访问Google ReCaptcha服务。 +ACCESS_HAS_BEEN_REVOKED = 您对该脑图的访问权限已被撤销。联系脑图所有人。 +MAP_CAN_NOT_BE_FOUND = 找不到该脑图,应该是被删除了。 +LABEL_CAN_NOT_BE_FOUND = 找不到该标签,应该是被删除了。 +MINDMAP_TIMESTAMP_OUTDATED =无法保存您的更改,因为您的思维导图已被''{0}''修改。刷新页面,然后重试。 +MINDMAP_OUTDATED_BY_YOU = 无法保存您的更改,因为脑图已经过期。您打开了多个页面吗?刷新页面,然后重试。 +MINDMAP_LOCKED = 脑图正在被{0}<{1}>编辑。脑图以只读模式打开。 +MINDMAP_IS_LOCKED = 脑图被锁定编辑。 +# Confirmed +RESET_PASSWORD_INVALID_EMAIL = 提供的电子邮件不是有效的用户账号。请使用有效的电子邮件重试。 +TRY_WELCOME = This edition space showcases some of the mindmap editor capabilities \!.此编辑区域展示了一些思维导图编辑器的功能\!。 +UNEXPECTED_ERROR_DETAILS = 处理请求时遇到意外错误。 +NO_ENOUGH_PERMISSIONS=无法打开思维导图。 +NO_ENOUGH_PERMISSIONS_DETAILS=您没有足够的权限查看此脑图。此脑图已更改为私有或被删除。 +CAPTCHA_TIMEOUT_OUT_DUPLICATE=请刷新页面,然后重试。 +CAPTCHA_INVALID_INPUT_RESPONSE="输入无效,刷新页面后重试。 +MINDMAP_EMPTY_ERROR=思维导图不能为空。 +INVALID_MINDMAP_FORMAT=思维导图格式无效。 +TOO_BIG_MINDMAP=你已经达到了一张思维导图中500个主题的限制。 \ No newline at end of file From c978d02514dfb694071c0c2da51bd10539b626f3 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Mon, 14 Mar 2022 00:08:31 -0300 Subject: [PATCH 27/27] Release 5.0.9 version --- pom.xml | 4 ++-- wise-ui/pom.xml | 10 +++++----- wise-webapp/pom.xml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index c76fba47..3d273c7f 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> - 5.0.8-SNAPSHOT + 5.0.9 ${project.basedir}/wise-webapps @@ -16,7 +16,7 @@ org.wisemapping wisemapping WiseMapping Project - 5.0.8-SNAPSHOT + 5.0.9 pom diff --git a/wise-ui/pom.xml b/wise-ui/pom.xml index 61e52fc5..971c1096 100644 --- a/wise-ui/pom.xml +++ b/wise-ui/pom.xml @@ -12,7 +12,7 @@ org.wisemapping wisemapping ../pom.xml - 5.0.8-SNAPSHOT + 5.0.9 @@ -29,11 +29,11 @@ - + - + @@ -42,11 +42,11 @@ - + - + diff --git a/wise-webapp/pom.xml b/wise-webapp/pom.xml index bae9a916..781a26e7 100644 --- a/wise-webapp/pom.xml +++ b/wise-webapp/pom.xml @@ -9,7 +9,7 @@ org.wisemapping wisemapping ../pom.xml - 5.0.8-SNAPSHOT + 5.0.9