From b0517db79e409283f931984170a0abb03c89db9c Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Mon, 11 Apr 2022 14:51:43 -0300 Subject: [PATCH 01/28] Bump up version. --- pom.xml | 4 ++-- wise-ui/pom.xml | 2 +- wise-webapp/pom.xml | 2 +- wise-webapp/src/main/resources/messages_es.properties | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 2e655ed3..e0d5281f 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> - 5.0.11 + 5.0.12-SNAPSHOT ${project.basedir}/wise-webapps @@ -16,7 +16,7 @@ org.wisemapping wisemapping WiseMapping Project - 5.0.11 + 5.0.12-SNAPSHOT pom diff --git a/wise-ui/pom.xml b/wise-ui/pom.xml index e0899ebf..55a8bcdd 100644 --- a/wise-ui/pom.xml +++ b/wise-ui/pom.xml @@ -12,7 +12,7 @@ org.wisemapping wisemapping ../pom.xml - 5.0.11 + 5.0.12-SNAPSHOT diff --git a/wise-webapp/pom.xml b/wise-webapp/pom.xml index a7b30423..cedb3680 100644 --- a/wise-webapp/pom.xml +++ b/wise-webapp/pom.xml @@ -9,7 +9,7 @@ org.wisemapping wisemapping ../pom.xml - 5.0.11 + 5.0.12-SNAPSHOT diff --git a/wise-webapp/src/main/resources/messages_es.properties b/wise-webapp/src/main/resources/messages_es.properties index 97e871db..7ca5ace1 100644 --- a/wise-webapp/src/main/resources/messages_es.properties +++ b/wise-webapp/src/main/resources/messages_es.properties @@ -58,7 +58,7 @@ INVALID_MINDMAP_FORMAT=Formato de mapa mental no válido. TOO_BIG_MINDMAP=Ha alcanzado el límite de 5000 nodos en un mapa mental. REGISTRATION.EMAIL_SUBJECT=Bienvenido/a a WiseMapping ! REGISTRATION.EMAIL_TITLE=Tu cuenta ha sido creada exitosamente -REGISTRATION.EMAIL_BODY=

Gracias por tu interest en WiseMapping. Hace click aqui para empezar a crear y compatir tus mapas mentales. Ideas y sugerencias, no dudes en contactarnos a feedback@wisemapping.com.

+REGISTRATION.EMAIL_BODY=

Gracias por tu interes en WiseMapping. Hace click aqui para empezar a crear y compatir tus mapas mentales. Ideas y sugerencias, no dudes en contactarnos a feedback@wisemapping.com.

CHANGE_PASSWORD.EMAIL_SUBJECT=Su contraseña ha sido restablecida CHANGE_PASSWORD.EMAIL_TITLE=Se ha generado una contraseña temporal CHANGE_PASSWORD.EMAIL_BODY=

Alguien, muy probablemente usted, solicitó una nueva contraseña para su cuenta de WiseMapping.

Esta es su nueva contraseña: {0}

Puede iniciar sesión haciendo clic aquí . Te recomendamos que cambie la contraseña lo antes posible.

From 50e0069532aba57f569b86f3614c01dc01356b40 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Mon, 11 Apr 2022 15:09:42 -0300 Subject: [PATCH 02/28] Improve email template --- .../wisemapping/mail/NotificationService.java | 10 +++++ .../src/main/resources/mail/baseLayout.vm | 6 +-- .../main/resources/mail/confirmationMail.vm | 44 +++++++++---------- .../main/resources/mail/newCollaboration.vm | 4 +- .../src/main/resources/messages_de.properties | 3 +- .../src/main/resources/messages_en.properties | 3 +- .../src/main/resources/messages_es.properties | 3 +- .../src/main/resources/messages_fr.properties | 3 +- .../src/main/resources/messages_ru.properties | 1 + .../src/main/resources/messages_zh.properties | 1 + 10 files changed, 48 insertions(+), 30 deletions(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/mail/NotificationService.java b/wise-webapp/src/main/java/com/wisemapping/mail/NotificationService.java index a2f184eb..1a7aaf6c 100644 --- a/wise-webapp/src/main/java/com/wisemapping/mail/NotificationService.java +++ b/wise-webapp/src/main/java/com/wisemapping/mail/NotificationService.java @@ -73,6 +73,11 @@ final public class NotificationService { model.put("message", message); model.put("doNotReplay", messageSource.getMessage("EMAIL.DO_NOT_REPLAY", new Object[]{mailer.getSupportEmail()}, locale)); + // To resolve resources on templates ... + model.put("noArg", new Object[]{}); + model.put("messages", messageSource); + model.put("locale", locale); + mailer.sendEmail(formMail, collabEmail, subject, model, "newCollaboration.vm"); } catch (Exception e) { handleException(e); @@ -122,6 +127,11 @@ final public class NotificationService { model.put("supportEmail", mailer.getSupportEmail()); model.put("doNotReplay", messageSource.getMessage("EMAIL.DO_NOT_REPLAY", new Object[]{mailer.getSupportEmail()}, locale)); + // To resolve resources on templates ... + model.put("noArg", new Object[]{}); + model.put("messages", messageSource); + model.put("locale", locale); + logger.debug("Email properties->" + model); mailer.sendEmail(mailer.getServerSenderEmail(), user.getEmail(), mailSubject, model, "baseLayout.vm"); } catch (Exception e) { diff --git a/wise-webapp/src/main/resources/mail/baseLayout.vm b/wise-webapp/src/main/resources/mail/baseLayout.vm index fe0972b1..4ecadb87 100644 --- a/wise-webapp/src/main/resources/mail/baseLayout.vm +++ b/wise-webapp/src/main/resources/mail/baseLayout.vm @@ -22,13 +22,13 @@
- Hi ${firstName}: + ${messages.getMessage("EMAIL.GREETINGS",$noArgs,$locale)} ${firstName}:

${messageBody}

-

Regards,
- The WiseMapping Team
+

+ The WiseMapping Team

diff --git a/wise-webapp/src/main/resources/mail/confirmationMail.vm b/wise-webapp/src/main/resources/mail/confirmationMail.vm index 5d16c0a9..352cc1b0 100644 --- a/wise-webapp/src/main/resources/mail/confirmationMail.vm +++ b/wise-webapp/src/main/resources/mail/confirmationMail.vm @@ -1,29 +1,29 @@ -

Welcome to WiseMapping!

+
+

Welcome to WiseMapping!

-

- To active your account and verify your e-mail address, please click on the following link. -

-${emailcheck} -

-

- If you have received this mail by error, you do not need to take any action to cancel the account. The account will - not be activated, and you will not receive any further emails. -

+

+ To active your account and verify your e-mail address, please click on the following link. +

+ ${emailcheck} +

+

+ If you have received this mail by error, you do not need to take any action to cancel the account. The account will + not be activated, and you will not receive any further emails. +

-

- If clicking the link above does not work, copy and paste the URL in a new browser window instead. -

+

+ If clicking the link above does not work, copy and paste the URL in a new browser window instead. +

-

- For questions or concerns regarding your account, send us an email to support@wisemapping.com. -

+

+ For questions or concerns regarding your account, send us an email to support@wisemapping.com. +

-

- Cheers,
- The WiseMapping Team. - WiseMapping Site -

+

+ The WiseMapping Team
+

+
- \ No newline at end of file + \ No newline at end of file diff --git a/wise-webapp/src/main/resources/mail/newCollaboration.vm b/wise-webapp/src/main/resources/mail/newCollaboration.vm index b5c49b19..267957be 100755 --- a/wise-webapp/src/main/resources/mail/newCollaboration.vm +++ b/wise-webapp/src/main/resources/mail/newCollaboration.vm @@ -33,6 +33,8 @@
-

${doNotReplay}

+

+ The WiseMapping Team
+

\ No newline at end of file diff --git a/wise-webapp/src/main/resources/messages_de.properties b/wise-webapp/src/main/resources/messages_de.properties index 1e729aae..1e9cd4f8 100644 --- a/wise-webapp/src/main/resources/messages_de.properties +++ b/wise-webapp/src/main/resources/messages_de.properties @@ -66,4 +66,5 @@ MINDMAP_EMPTY_ERROR=Mindmap darf nicht leer sein. INVALID_MINDMAP_FORMAT=Ungültiges Mindmap-Format. TOO_BIG_MINDMAP=Sie haben das Limit von 5000 Themen in einer Mindmap erreicht. SHARE_MAP.EMAIL_SUBJECT={0} hat eine Mindmap mit Ihnen geteilt -EMAIL.DO_NOT_REPLAY=Wichtig: Antworten Sie nicht auf diese E-Mail. Wenn Sie weitere Hilfe benötigen oder Bedenken bezüglich Ihres Kontos haben, kontaktieren Sie uns hier. \ No newline at end of file +EMAIL.DO_NOT_REPLAY=Wichtig: Antworten Sie nicht auf diese E-Mail. Wenn Sie weitere Hilfe benötigen oder Bedenken bezüglich Ihres Kontos haben, kontaktieren Sie uns hier. +EMAIL.GREETINGS=Hallo \ No newline at end of file diff --git a/wise-webapp/src/main/resources/messages_en.properties b/wise-webapp/src/main/resources/messages_en.properties index a9c2f181..f28273c7 100644 --- a/wise-webapp/src/main/resources/messages_en.properties +++ b/wise-webapp/src/main/resources/messages_en.properties @@ -67,4 +67,5 @@ PASSWORD_CHANGED.EMAIL_SUBJECT=Your password has been changed PASSWORD_CHANGED.EMAIL_TITLE=Your password has been changed successfully PASSWORD_CHANGED.EMAIL_BODY=

This is only an notification that your password has been changed. No further action is required.

SHARE_MAP.EMAIL_SUBJECT={0} has shared a mind map with you -EMAIL.DO_NOT_REPLAY=Important: Do not reply this email. If you need further help or have any concerns regarding your account, contact us to here. \ No newline at end of file +EMAIL.DO_NOT_REPLAY=Important: Do not reply this email. If you need further help or have any concerns regarding your account, contact us to here. +EMAIL.GREETINGS=Hi \ No newline at end of file diff --git a/wise-webapp/src/main/resources/messages_es.properties b/wise-webapp/src/main/resources/messages_es.properties index 7ca5ace1..2bf83288 100644 --- a/wise-webapp/src/main/resources/messages_es.properties +++ b/wise-webapp/src/main/resources/messages_es.properties @@ -66,4 +66,5 @@ PASSWORD_CHANGED.EMAIL_SUBJECT=Su contraseña ha sido cambiada PASSWORD_CHANGED.EMAIL_TITLE=Su contraseña ha sido cambiada con éxito PASSWORD_CHANGED.EMAIL_BODY=

Esto es solo una notificación de que su contraseña ha sido cambiada. No se requiere ninguna otra acción.

SHARE_MAP.EMAIL_SUBJECT={0} te ha compartido un mapa mental -EMAIL.DO_NOT_REPLAY=Importante: No responda este correo electrónico. Si necesita más ayuda o tiene alguna inquietud con respecto a su cuenta, comuníquese con nosotros a aquí. \ No newline at end of file +EMAIL.DO_NOT_REPLAY=Importante: No responda este correo electrónico. Si necesita más ayuda o tiene alguna inquietud con respecto a su cuenta, comuníquese con nosotros a aquí. +EMAIL.GREETINGS=Hola \ No newline at end of file diff --git a/wise-webapp/src/main/resources/messages_fr.properties b/wise-webapp/src/main/resources/messages_fr.properties index b55fe419..a4c4be8c 100644 --- a/wise-webapp/src/main/resources/messages_fr.properties +++ b/wise-webapp/src/main/resources/messages_fr.properties @@ -66,4 +66,5 @@ MINDMAP_EMPTY_ERROR=La carte mentale ne peut pas être vide. INVALID_MINDMAP_FORMAT=Format de carte mentale non valide. TOO_BIG_MINDMAP=Vous avez atteint la limite de 5000 sujets dans une carte mentale. SHARE_MAP.EMAIL_SUBJECT={0} a partagé une carte mentale avec vous -EMAIL.DO_NOT_REPLAY=Important : Ne répondez pas à cet e-mail. Si vous avez besoin d'aide supplémentaire ou si vous avez des inquiétudes concernant votre compte, contactez-nous ici. \ No newline at end of file +EMAIL.DO_NOT_REPLAY=Important : Ne répondez pas à cet e-mail. Si vous avez besoin d'aide supplémentaire ou si vous avez des inquiétudes concernant votre compte, contactez-nous ici. +EMAIL.GREETINGS=Salut \ No newline at end of file diff --git a/wise-webapp/src/main/resources/messages_ru.properties b/wise-webapp/src/main/resources/messages_ru.properties index 3caef0fd..1cb6340a 100644 --- a/wise-webapp/src/main/resources/messages_ru.properties +++ b/wise-webapp/src/main/resources/messages_ru.properties @@ -61,3 +61,4 @@ REGISTRATION.EMAIL_TITLE=Ваша учетная запись успешно с REGISTRATION.EMAIL_BODY=

Благодарим вас за интерес к WiseMapping. Нажмите здесь, чтобы начать создавать и публиковать новые интеллект-карты. Если у вас есть какие-либо отзывы или идеи, отправьте нам электронное письмо по адресу feedback@wisemapping.com. Мы будем рады услышать от вас.

SHARE_MAP.EMAIL_SUBJECT={0} has shared a mindmap with you EMAIL.DO_NOT_REPLAY=Important: Do not reply this email. If you need further help or have any concerns regarding your account, contact us to here. +EMAIL.GREETINGS=Hi \ No newline at end of file diff --git a/wise-webapp/src/main/resources/messages_zh.properties b/wise-webapp/src/main/resources/messages_zh.properties index d8f323ef..c89b447c 100644 --- a/wise-webapp/src/main/resources/messages_zh.properties +++ b/wise-webapp/src/main/resources/messages_zh.properties @@ -67,3 +67,4 @@ PASSWORD_CHANGED.EMAIL_TITLE=你已经成功更改密码 PASSWORD_CHANGED.EMAIL_BODY=

这只是您的密码已更改的通知。无需进一步操作。

SHARE_MAP.EMAIL_SUBJECT={0} 与您分享了一张思维导图 EMAIL.DO_NOT_REPLAY=Important: Do not reply this email. If you need further help or have any concerns regarding your account, contact us to here. +EMAIL.GREETINGS=Hi \ No newline at end of file From c6ddadba45dfcfff8ca8cc03f1ab4cce6d8373cf Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Mon, 11 Apr 2022 15:41:13 -0300 Subject: [PATCH 03/28] Fix tooltip rendering. --- wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp b/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp index 88962da4..3ad8afee 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp @@ -23,7 +23,10 @@ <%@ include file="/jsp/googleAnalytics.jsf" %> -
+ +
+
+ From 7af79256104b201b1102ce25d23bf8808672a884 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Mon, 11 Apr 2022 16:58:06 -0300 Subject: [PATCH 04/28] Add control to limit the number of accounts to share. --- .../com/wisemapping/dao/UserManagerImpl.java | 1 + .../TooManyInactiveAccountsExceptions.java | 37 ++++++++++++++++ .../wisemapping/rest/MindmapController.java | 42 ++++++++++++++++--- .../src/main/resources/messages_en.properties | 3 +- 4 files changed, 76 insertions(+), 7 deletions(-) create mode 100755 wise-webapp/src/main/java/com/wisemapping/exceptions/TooManyInactiveAccountsExceptions.java diff --git a/wise-webapp/src/main/java/com/wisemapping/dao/UserManagerImpl.java b/wise-webapp/src/main/java/com/wisemapping/dao/UserManagerImpl.java index 3e5f9893..663fe9d2 100644 --- a/wise-webapp/src/main/java/com/wisemapping/dao/UserManagerImpl.java +++ b/wise-webapp/src/main/java/com/wisemapping/dao/UserManagerImpl.java @@ -52,6 +52,7 @@ public class UserManagerImpl @Override + @Nullable public User getUserBy(@NotNull final String email) { User user = null; diff --git a/wise-webapp/src/main/java/com/wisemapping/exceptions/TooManyInactiveAccountsExceptions.java b/wise-webapp/src/main/java/com/wisemapping/exceptions/TooManyInactiveAccountsExceptions.java new file mode 100755 index 00000000..dc2c8428 --- /dev/null +++ b/wise-webapp/src/main/java/com/wisemapping/exceptions/TooManyInactiveAccountsExceptions.java @@ -0,0 +1,37 @@ +/* + * Copyright [2022] [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.exceptions; + + +import javax.validation.constraints.NotNull; + +public class TooManyInactiveAccountsExceptions + extends ClientException { + private static final String TOO_MANY_INACTIVE_ACCOUNTS = "TOO_MANY_INACTIVE_ACCOUNTS"; + + public TooManyInactiveAccountsExceptions(@NotNull long accounts) { + super("Too many inactive accounts:" + accounts, Severity.WARNING); + } + + @NotNull + @Override + protected String getMsgBundleKey() { + return TOO_MANY_INACTIVE_ACCOUNTS; + } +} 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 c59eb0f2..370f7c57 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java @@ -41,7 +41,6 @@ import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.*; import java.util.stream.Collectors; -import java.util.stream.Stream; @Controller @@ -49,6 +48,7 @@ public class MindmapController extends BaseController { final Logger logger = Logger.getLogger(MindmapController.class); private static final String LATEST_HISTORY_REVISION = "latest"; + private static final int MAX_ACCOUNTS_INACTIVE = 20; @Qualifier("mindmapService") @Autowired @@ -58,6 +58,10 @@ public class MindmapController extends BaseController { @Autowired private LabelService labelService; + @Qualifier("userService") + @Autowired + private UserService userService; + @RequestMapping(method = RequestMethod.GET, value = "/maps/{id}", produces = {"application/json"}) @ResponseBody public RestMindmap retrieve(@PathVariable int id) throws WiseMappingException { @@ -169,7 +173,7 @@ public class MindmapController extends BaseController { /** * The intention of this method is the update of several properties at once ... */ - @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}", consumes = { "application/json"}, produces = {"application/json"}) + @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}", consumes = {"application/json"}, produces = {"application/json"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) public void updateProperties(@RequestBody RestMindmap restMindmap, @PathVariable int id, @RequestParam(required = false) boolean minor) throws IOException, WiseMappingException { @@ -243,7 +247,7 @@ public class MindmapController extends BaseController { @RequestMapping(method = RequestMethod.POST, value = "/maps/{id}/collabs/", consumes = {"application/json"}, produces = {"application/json"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) - public void updateCollabs(@PathVariable int id, @NotNull @RequestBody RestCollaborationList restCollabs) throws CollaborationException, MapCouldNotFoundException, AccessDeniedSecurityException, InvalidEmailException { + public void updateCollabs(@PathVariable int id, @NotNull @RequestBody RestCollaborationList restCollabs) throws CollaborationException, MapCouldNotFoundException, AccessDeniedSecurityException, InvalidEmailException, TooManyInactiveAccountsExceptions { final Mindmap mindMap = findMindmapById(id); // Only owner can change collaborators... @@ -252,6 +256,9 @@ public class MindmapController extends BaseController { throw new IllegalArgumentException("No enough permissions"); } + // Do not allow more than 20 collabs not active + verifyActiveCollabs(restCollabs, user); + // Compare one by one if some of the elements has been changed .... final Set collabsToRemove = new HashSet<>(mindMap.getCollaborations()); for (RestCollaboration restCollab : restCollabs.getCollaborations()) { @@ -279,7 +286,6 @@ public class MindmapController extends BaseController { if (role != CollaborationRole.OWNER) { mindmapService.addCollaboration(mindMap, restCollab.getEmail(), role, restCollabs.getMessage()); } - } // Remove all collaborations that no applies anymore .. @@ -290,7 +296,7 @@ public class MindmapController extends BaseController { @RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/collabs/", consumes = {"application/json"}, produces = {"application/json"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) - public void addCollab(@PathVariable int id, @NotNull @RequestBody RestCollaborationList restCollabs) throws CollaborationException, MapCouldNotFoundException, AccessDeniedSecurityException, InvalidEmailException { + public void addCollab(@PathVariable int id, @NotNull @RequestBody RestCollaborationList restCollabs) throws CollaborationException, MapCouldNotFoundException, AccessDeniedSecurityException, InvalidEmailException, TooManyInactiveAccountsExceptions { final Mindmap mindMap = findMindmapById(id); // Only owner can change collaborators... @@ -299,6 +305,9 @@ public class MindmapController extends BaseController { throw new AccessDeniedSecurityException("User must be owner to share mindmap"); } + // Do not allow more than 20 collabs not active + verifyActiveCollabs(restCollabs, user); + // Is valid email address ? final EmailValidator emailValidator = EmailValidator.getInstance(); final Set invalidEmails = restCollabs @@ -503,7 +512,7 @@ public class MindmapController extends BaseController { response.setHeader("ResourceId", Integer.toString(mindmap.getId())); } - @RequestMapping(method = RequestMethod.POST, value = "/maps/{id}", consumes = {"application/json"}, produces = { "application/json", "text/plain"}) + @RequestMapping(method = RequestMethod.POST, value = "/maps/{id}", consumes = {"application/json"}, produces = {"application/json", "text/plain"}) @ResponseStatus(value = HttpStatus.CREATED) public void createDuplicate(@RequestBody RestMindmapInfo restMindmap, @PathVariable int id, @NotNull HttpServletResponse response) throws IOException, WiseMappingException { // Validate ... @@ -588,4 +597,25 @@ public class MindmapController extends BaseController { } return result; } + + private void verifyActiveCollabs(@NotNull RestCollaborationList restCollabs, User user) throws TooManyInactiveAccountsExceptions { + // Do not allow more than 20 new accounts per mindmap... + final List userMindmaps = mindmapService.findMindmapsByUser(user); + final Set allEmails = userMindmaps + .stream() + .filter(m -> m.hasPermissions(user, CollaborationRole.OWNER)) + .map(Mindmap::getCollaborations) + .flatMap(Collection::stream) + .map(c -> c.getCollaborator().getEmail()) + .collect(Collectors.toSet()); + allEmails.addAll(restCollabs + .getCollaborations().stream() + .map(RestCollaboration::getEmail) + .collect(Collectors.toSet())); + + long inactiveAccounts = allEmails.stream().filter(e -> userService.getUserBy(e) == null).count(); + if (inactiveAccounts > MAX_ACCOUNTS_INACTIVE) { + throw new TooManyInactiveAccountsExceptions(inactiveAccounts); + } + } } diff --git a/wise-webapp/src/main/resources/messages_en.properties b/wise-webapp/src/main/resources/messages_en.properties index f28273c7..36de1159 100644 --- a/wise-webapp/src/main/resources/messages_en.properties +++ b/wise-webapp/src/main/resources/messages_en.properties @@ -68,4 +68,5 @@ PASSWORD_CHANGED.EMAIL_TITLE=Your password has been changed successfully PASSWORD_CHANGED.EMAIL_BODY=

This is only an notification that your password has been changed. No further action is required.

SHARE_MAP.EMAIL_SUBJECT={0} has shared a mind map with you EMAIL.DO_NOT_REPLAY=Important: Do not reply this email. If you need further help or have any concerns regarding your account, contact us to
here. -EMAIL.GREETINGS=Hi \ No newline at end of file +EMAIL.GREETINGS=Hi +TOO_MANY_INACTIVE_ACCOUNTS=You have shared your mindmaps to more than 20 user that have not registered yet. Please, remove inactive accounts or ask them to register. \ No newline at end of file From 3e9a5a0b1260f62e0fc684b1a91f91f735a794f1 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Mon, 11 Apr 2022 17:50:19 -0300 Subject: [PATCH 05/28] Add exclusion list for domains. --- .../com/wisemapping/rest/AdminController.java | 43 ++++++----- .../wisemapping/rest/MindmapController.java | 7 +- .../com/wisemapping/rest/UserController.java | 12 ++++ .../security/AuthenticationProvider.java | 6 ++ .../security/UserDetailsService.java | 72 +------------------ .../src/main/webapp/WEB-INF/app.properties | 5 ++ 6 files changed, 49 insertions(+), 96 deletions(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java b/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java index ca516dda..352f5681 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java @@ -1,20 +1,20 @@ /* -* Copyright [2022] [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. -*/ + * Copyright [2022] [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.rest; @@ -26,19 +26,16 @@ import com.wisemapping.model.User; import com.wisemapping.rest.model.RestUser; import com.wisemapping.service.MindmapService; 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.beans.factory.annotation.Value; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.util.Calendar; import java.util.List; -import java.util.regex.Pattern; @Controller public class AdminController extends BaseController { @@ -70,7 +67,7 @@ public class AdminController extends BaseController { return new RestUser(user); } - @RequestMapping(method = RequestMethod.POST, value = "admin/users", consumes = { "application/json"}, produces = {"application/json"}) + @RequestMapping(method = RequestMethod.POST, value = "admin/users", consumes = {"application/json"}, produces = {"application/json"}) @ResponseStatus(value = HttpStatus.CREATED) public void createUser(@RequestBody RestUser user, HttpServletResponse response) throws WiseMappingException { if (user == null) { @@ -109,7 +106,7 @@ public class AdminController extends BaseController { @RequestMapping(method = RequestMethod.PUT, value = "admin/users/{id}/password", consumes = {"text/plain"}) @ResponseStatus(value = HttpStatus.NO_CONTENT) - public void changePassword(@RequestBody String password, @PathVariable int id) throws WiseMappingException { + public void changePassword(@RequestBody String password, @PathVariable int id) throws WiseMappingException { if (password == null) { throw new IllegalArgumentException("Password can not be null"); } @@ -133,7 +130,7 @@ public class AdminController extends BaseController { final List collaborations = mindmapService.findCollaborations(user); for (Collaboration collaboration : collaborations) { final Mindmap mindmap = collaboration.getMindMap(); - mindmapService.removeMindmap(mindmap,user); + mindmapService.removeMindmap(mindmap, user); } userService.removeUser(user); 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 370f7c57..6103a51d 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java @@ -29,6 +29,7 @@ import org.apache.log4j.Logger; import org.jetbrains.annotations.NotNull; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; @@ -48,7 +49,6 @@ public class MindmapController extends BaseController { final Logger logger = Logger.getLogger(MindmapController.class); private static final String LATEST_HISTORY_REVISION = "latest"; - private static final int MAX_ACCOUNTS_INACTIVE = 20; @Qualifier("mindmapService") @Autowired @@ -62,6 +62,9 @@ public class MindmapController extends BaseController { @Autowired private UserService userService; + @Value("${accounts.maxInactive:20}") + private int maxAccountsInactive; + @RequestMapping(method = RequestMethod.GET, value = "/maps/{id}", produces = {"application/json"}) @ResponseBody public RestMindmap retrieve(@PathVariable int id) throws WiseMappingException { @@ -614,7 +617,7 @@ public class MindmapController extends BaseController { .collect(Collectors.toSet())); long inactiveAccounts = allEmails.stream().filter(e -> userService.getUserBy(e) == null).count(); - if (inactiveAccounts > MAX_ACCOUNTS_INACTIVE) { + if (inactiveAccounts > maxAccountsInactive) { throw new TooManyInactiveAccountsExceptions(inactiveAccounts); } } diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/UserController.java b/wise-webapp/src/main/java/com/wisemapping/rest/UserController.java index 64260877..2574ae79 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/UserController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/UserController.java @@ -38,6 +38,8 @@ import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; +import java.util.List; @Controller @CrossOrigin @@ -52,6 +54,9 @@ public class UserController extends BaseController { @Value("${google.recaptcha2.enabled}") private Boolean recatchaEnabled; + @Value("${accounts.exclusion.domain:''}") + private String domainBanExclusion; + private static final Logger logger = Logger.getLogger(UserController.class); private static final String REAL_IP_ADDRESS_HEADER = "X-Real-IP"; @@ -115,5 +120,12 @@ public class UserController extends BaseController { if (errors.hasErrors()) { throw errors; } + + // Is excluded ?. + final List excludedDomains = Arrays.asList(domainBanExclusion.split(",")); + final String emailDomain = registration.getEmail().split("@")[1]; + if (excludedDomains.contains(emailDomain)) { + throw new IllegalArgumentException("Email is part of ban exclusion list due to abuse. Please, contact site admin if you think this is an error." + emailDomain); + } } } diff --git a/wise-webapp/src/main/java/com/wisemapping/security/AuthenticationProvider.java b/wise-webapp/src/main/java/com/wisemapping/security/AuthenticationProvider.java index a4240d07..00f433f8 100644 --- a/wise-webapp/src/main/java/com/wisemapping/security/AuthenticationProvider.java +++ b/wise-webapp/src/main/java/com/wisemapping/security/AuthenticationProvider.java @@ -45,6 +45,12 @@ public class AuthenticationProvider implements org.springframework.security.auth if (user == null || credentials == null || !encoder.matches(user.getPassword(), credentials)) { throw new BadCredentialsException("Username/Password does not match for " + auth.getPrincipal()); } + + // User has been disabled ... + if (!user.isActive()) { + throw new BadCredentialsException("User has been disabled for login " + auth.getPrincipal()); + } + userDetailsService.getUserService().auditLogin(user); return new UsernamePasswordAuthenticationToken(userDetails, credentials, userDetails.getAuthorities()); } diff --git a/wise-webapp/src/main/java/com/wisemapping/security/UserDetailsService.java b/wise-webapp/src/main/java/com/wisemapping/security/UserDetailsService.java index a400294a..4a32bf35 100644 --- a/wise-webapp/src/main/java/com/wisemapping/security/UserDetailsService.java +++ b/wise-webapp/src/main/java/com/wisemapping/security/UserDetailsService.java @@ -23,6 +23,7 @@ import com.wisemapping.model.User; import com.wisemapping.service.UserService; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.springframework.beans.factory.annotation.Value; import org.springframework.dao.DataAccessException; import org.springframework.security.core.userdetails.UsernameNotFoundException; @@ -43,77 +44,6 @@ public class UserDetailsService } } -// @Override -// @NotNull -// public UserDetails loadUserDetails(@NotNull OpenIDAuthenticationToken token) throws UsernameNotFoundException { -// -// final User tUser = buildUserFromToken(token); -// final User dbUser = userService.getUserBy(tUser.getEmail()); -// -// final User result; -// if (dbUser != null) { -// if (!token.getIdentityUrl().equals(dbUser.getAuthenticatorUri())) { -// throw new IllegalStateException("Identity url for this user can not change:" + token.getIdentityUrl()); -// } -// result = dbUser; -// } else { -// try { -// tUser.setAuthenticationType(AuthenticationType.OPENID); -// tUser.setAuthenticatorUri(token.getIdentityUrl()); -// -// result = userService.createUser(tUser, false, false); -// } catch (WiseMappingException e) { -// throw new IllegalStateException(e); -// } -// -// } -// return new UserDetails(result, isAdmin(result.getEmail())); -// } - -// @NotNull -// private User buildUserFromToken(@NotNull OpenIDAuthenticationToken token) { -// final User result = new User(); -// -// String lastName = null; -// String firstName = null; -// String email = null; -// String fullName = null; -// -// final List attributes = token.getAttributes(); -// for (OpenIDAttribute attribute : attributes) { -// if (attribute.getName().equals("email")) { -// email = attribute.getValues().get(0); -// } -// -// if (attribute.getName().equals("firstname")) { -// firstName = attribute.getValues().get(0); -// -// } -// -// if (attribute.getName().equals("lastname")) { -// lastName = attribute.getValues().get(0); -// } -// -// if (attribute.getName().equals("fullname")) { -// fullName = attribute.getValues().get(0); -// } -// -// } -// if (lastName == null || firstName == null) { -// result.setFirstname(fullName); -// result.setLastname(""); -// } else { -// result.setLastname(lastName); -// result.setFirstname(firstName); -// } -// result.setEmail(email); -// result.setPassword(""); -// -// final Calendar now = Calendar.getInstance(); -// result.setActivationDate(now); -// return result; -// } - private boolean isAdmin(@Nullable String email) { return email != null && adminUser != null && email.trim().endsWith(adminUser); } diff --git a/wise-webapp/src/main/webapp/WEB-INF/app.properties b/wise-webapp/src/main/webapp/WEB-INF/app.properties index 3a01ea34..3cbab059 100755 --- a/wise-webapp/src/main/webapp/WEB-INF/app.properties +++ b/wise-webapp/src/main/webapp/WEB-INF/app.properties @@ -134,6 +134,11 @@ security.ldap.auth.attribute=mail security.ldap.lastName.attribute=sn security.ldap.firstName.attribute=givenName +# User Account filtering policies + +# Coma separated list of domains and emails ban +#accounts.exclusion.domain= + From 3732e858b53dc7f604d7c1b4dae5d4c6221662ae Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Tue, 12 Apr 2022 08:26:35 -0300 Subject: [PATCH 06/28] Update robot.txt exclusions --- wise-webapp/src/main/webapp/robots.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wise-webapp/src/main/webapp/robots.txt b/wise-webapp/src/main/webapp/robots.txt index e9e57dc4..e53f0786 100644 --- a/wise-webapp/src/main/webapp/robots.txt +++ b/wise-webapp/src/main/webapp/robots.txt @@ -1,3 +1,7 @@ -# https://www.robotstxt.org/robotstxt.html +Sitemap: https://www.wisemapping.com/sitemap.xml + User-agent: * -Disallow: +Allow: / +Disallow: /c/restful/maps/*/document/xml-pub +Disallow: /c/restful/maps/*/editor + From deb4cf498a08716e4888ea9b51e35a463253371c Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Tue, 12 Apr 2022 08:27:53 -0300 Subject: [PATCH 07/28] Minor fix --- wise-webapp/src/main/webapp/robots.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wise-webapp/src/main/webapp/robots.txt b/wise-webapp/src/main/webapp/robots.txt index e53f0786..76a65bfa 100644 --- a/wise-webapp/src/main/webapp/robots.txt +++ b/wise-webapp/src/main/webapp/robots.txt @@ -3,5 +3,5 @@ Sitemap: https://www.wisemapping.com/sitemap.xml User-agent: * Allow: / Disallow: /c/restful/maps/*/document/xml-pub -Disallow: /c/restful/maps/*/editor +Disallow: /c/maps/*/edit From 0f1e0d29f2684d7b7e48445c2ac3ae950161c7bf Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Wed, 13 Apr 2022 19:16:51 -0300 Subject: [PATCH 08/28] Add support for base url configuration --- README.md | 11 ++++------- wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp | 2 +- wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp | 1 - wise-webapp/src/main/webapp/jsp/reactInclude.jsp | 2 +- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 799ffe51..56af75bc 100644 --- a/README.md +++ b/README.md @@ -46,12 +46,12 @@ In order to reduce the life-cycle to develop UI backend testing, you can do the A quick and dirty solution to share changes in the UI is to manually compile the dist. This will make the loader file available without the need to publish: -`yarn --cwd wisemapping-frontend build;cp -r wisemapping-frontend/packages/mindplot/dist/* wisemapping-open-source/wise-ui/target/wisemapping-mindplot/package/dist;cp -r wisemapping-frontend/packages/mindplot/dist/* wisemapping-open-source/wise-ui/target/wisemapping-mindplot/package/dist` +`yarn --cwd wisemapping-frontend build;cp -r wisemapping-frontend/packages/mindplot/dist/* wisemapping-open-source/wise-ui/target/wisemapping-mindplot/package/dist;cp -r wisemapping-frontend/packages/webapp/dist/* wisemapping-open-source/wise-ui/target/wisemapping-webapp/package/dist` ### Compiling and running with docker-compose -Check out the [docker section](./docker/README. +Check out the [docker section](./docker/README.) ## Members @@ -60,13 +60,10 @@ Check out the [docker section](./docker/README. * Paulo Veiga * Pablo Luna -### Individual Contributors - - * Ezequiel Bergamaschi - ### Past Individual Contributors - * Ignacio Manzano + * Ignacio Manzano + * Ezequiel Bergamaschi ## License diff --git a/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp b/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp index 637bf2cb..80d85a89 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp @@ -23,7 +23,7 @@ - - - diff --git a/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp b/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp index 324433ad..ddc4a8d0 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp @@ -19,7 +19,20 @@ var locale = '${locale}'; var isAuth = ${principal != null}; - <%@ include file="/jsp/googleAnalytics.jsf" %> + + + + + + From 038c4fa6fe5d1245983c7da0250746ad6f8a04a1 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sun, 29 May 2022 22:07:38 -0700 Subject: [PATCH 14/28] Fix url typo --- wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp b/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp index ddc4a8d0..c7b22d39 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp @@ -21,7 +21,7 @@ - + From 0920dab922016d9cceb02a73fe7e3c3e962619c8 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Wed, 29 Jun 2022 18:24:42 -0700 Subject: [PATCH 16/28] Update readme documentation. --- distribution/README.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/distribution/README.md b/distribution/README.md index 32908080..26584dda 100644 --- a/distribution/README.md +++ b/distribution/README.md @@ -9,7 +9,7 @@ There are multiple ways to run WiseMapping depending on your database configurat ## Option 1: Running HSQL within the image storage -> $ docker run -it --rm -p 8080:8080 veigap/wisemapping:latest> +> $ docker run -it --rm -p 8080:8080 wisemapping/wisemapping:latest Then, open your browser at `http://localhost:8888`. A default user is available for testing `test@wisemapping.com` and password `test`. @@ -17,7 +17,19 @@ Then, open your browser at `http://localhost:8888`. A default user is available ## Option 2: Running HSQL with mounted directory -> $ docker run -it --rm -p 8080:8080 veigap/wisemapping:latest +Only one time, copy the empty default out of the container: + +> $ mkdir your- db-dir-store-path +> +> $ docker run --name wiseapp -d --mount type=bind,source=your-db-dir-store-path,target=/var/lib/wise-db wisemapping/wisemapping:latest +> +> $ docker cp wiseapp:/var/lib/wisemapping/db your-db-dir-store-path +> +> $ docker stop wiseapp;docker rm wiseapp + +Then, execute the container mounting tbe directory: + +> $ docker run --mount type=bind,source=your-db-dir-store-path/db,target=/var/lib/wisemapping/db -it --rm -p 8080:8080 wisemapping/wisemapping:latest ## Option 3: External MySQL/PostgreSQL @@ -36,7 +48,7 @@ Download `app.properties` configuration file and configure the required sections Run the application mounting your previously configured `app.properties` -> $ docker run --mount type=bind,source=your-file-path/app.properties,target=/usr/local/tomcat/webapps/ROOT/WEB-INF/app.properties -it --rm -p 8080:8080 veigap/wisemapping:latest +> $ docker run --mount type=bind,source=your-file-path/app.properties,target=/usr/local/tomcat/webapps/ROOT/WEB-INF/app.properties -it --rm -p 8080:8080 wisemapping/wisemapping:latest # Advanced configuration From a49b870f03499e5e0879ce29ad9d478d8ce1bcec Mon Sep 17 00:00:00 2001 From: Gustavo Fuhr Date: Mon, 4 Jul 2022 22:10:30 +0000 Subject: [PATCH 17/28] Merged in ray-develop (pull request #14) PR ray-develop -> develop * fix view and public mode, initial scale and body size Approved-by: Paulo Veiga --- .../src/main/webapp/jsp/mindmapViewonly.jsp | 125 ++++++++++-------- 1 file changed, 71 insertions(+), 54 deletions(-) diff --git a/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp b/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp index 34217c90..3e6cbe8b 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp @@ -7,6 +7,7 @@ + ${mindmap.title} | <spring:message code="SITE.TITLE"/> @@ -33,63 +34,79 @@ + + +
+
+
+ + + + + + +
+ :${mindmap.creator.fullName} + :${mindmap.title} +
+ + + +
+
+ + +
+ +
+
+
+
-
-
+ - -
-
- - -
- -
-
-
- - + const zoomOutButton = document.getElementById('zoom-minus'); + if (zoomOutButton) { + zoomOutButton.addEventListener('click', () => { + designer.zoomOut(); + }); + } + + const position = document.getElementById('position'); + if (position) { + position.addEventListener('click', () => { + designer.zoomToFit(); + }); + } + From 8554fb7507d8e730c67e701d83d23a982860fb46 Mon Sep 17 00:00:00 2001 From: Gustavo Fuhr Date: Sat, 9 Jul 2022 01:35:06 +0000 Subject: [PATCH 18/28] Merged in ray-develop (pull request #16) Ray develop * fix view and public mode, initial scale and body size * Merged develop into ray-develop * root container size now is defined with css * Merge branch 'ray-develop' of bitbucket.org:wisemapping/wisemapping-open-source into ray-develop Approved-by: Paulo Veiga --- wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp | 2 +- wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp b/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp index 80d85a89..d84ea8ae 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp @@ -44,7 +44,7 @@ -
+
diff --git a/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp b/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp index 3e6cbe8b..125541da 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp @@ -43,7 +43,7 @@ margin: 0px; } - #root { + .mindplot-root { height: 100%; width: 100%; } @@ -52,7 +52,7 @@ -
+
From 845fb2f1dfd82313e892f671de368a5295ccc798 Mon Sep 17 00:00:00 2001 From: Gustavo Fuhr Date: Thu, 14 Jul 2022 03:12:56 +0000 Subject: [PATCH 19/28] Merged in body-size-alternative (pull request #17) alternative way to set body to fit browser window * alternative way to set body to fit browser window --- wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp b/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp index 125541da..dbef31e4 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapViewonly.jsp @@ -36,10 +36,11 @@