From 7c060ee1929671d9fcd4c447652892e0f234efe2 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Fri, 21 Oct 2022 18:37:33 -0700 Subject: [PATCH] Fix typo --- ...ChangeException.java => OwnerCannotChangeException.java} | 4 ++-- .../main/java/com/wisemapping/rest/MindmapController.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) rename wise-webapp/src/main/java/com/wisemapping/exceptions/{OnwerCollabCannotChangeException.java => OwnerCannotChangeException.java} (88%) diff --git a/wise-webapp/src/main/java/com/wisemapping/exceptions/OnwerCollabCannotChangeException.java b/wise-webapp/src/main/java/com/wisemapping/exceptions/OwnerCannotChangeException.java similarity index 88% rename from wise-webapp/src/main/java/com/wisemapping/exceptions/OnwerCollabCannotChangeException.java rename to wise-webapp/src/main/java/com/wisemapping/exceptions/OwnerCannotChangeException.java index 0f3367b3..0d10c695 100755 --- a/wise-webapp/src/main/java/com/wisemapping/exceptions/OnwerCollabCannotChangeException.java +++ b/wise-webapp/src/main/java/com/wisemapping/exceptions/OwnerCannotChangeException.java @@ -20,13 +20,13 @@ package com.wisemapping.exceptions; import org.jetbrains.annotations.NotNull; -public class OnwerCollabCannotChangeException +public class OwnerCannotChangeException extends ClientException { private static final String MSG_KEY = "OWNER_ROLE_CAN_NOT_BE_CHANGED"; - public OnwerCollabCannotChangeException(@NotNull String email) + public OwnerCannotChangeException(@NotNull String email) { super("Collab email can not be change. " + email + " is the the owner.",Severity.WARNING); } 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 827027f6..416233f8 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/MindmapController.java @@ -299,7 +299,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, TooManyInactiveAccountsExceptions, OnwerCollabCannotChangeException { + public void addCollab(@PathVariable int id, @NotNull @RequestBody RestCollaborationList restCollabs) throws CollaborationException, MapCouldNotFoundException, AccessDeniedSecurityException, InvalidEmailException, TooManyInactiveAccountsExceptions, OwnerCannotChangeException { final Mindmap mindMap = findMindmapById(id); // Only owner can change collaborators... @@ -346,12 +346,12 @@ public class MindmapController extends BaseController { // Are we trying to change the owner ... if (currentCollab != null && currentCollab.getRole() == CollaborationRole.OWNER) { - throw new OnwerCollabCannotChangeException(collabEmail); + throw new OwnerCannotChangeException(collabEmail); } // Role can not be changed ... if (newRole == CollaborationRole.OWNER) { - throw new OnwerCollabCannotChangeException(collabEmail); + throw new OwnerCannotChangeException(collabEmail); } // This is collaboration that with different newRole, try to change it ...