diff --git a/wise-api/src/main/java/com/wisemapping/exceptions/AccessDeniedSecurityException.java b/wise-api/src/main/java/com/wisemapping/exceptions/AccessDeniedSecurityException.java index 8fb25bec..19ddf5e3 100755 --- a/wise-api/src/main/java/com/wisemapping/exceptions/AccessDeniedSecurityException.java +++ b/wise-api/src/main/java/com/wisemapping/exceptions/AccessDeniedSecurityException.java @@ -30,7 +30,7 @@ public class AccessDeniedSecurityException } public AccessDeniedSecurityException(@NotNull long mapId, Collaborator user) { - super("No enough permissions to access map. Id: " + mapId + ", User: " + user, Severity.FATAL); + super("You do not have enough right access to see this map. This map has been changed to private or deleted.", Severity.FATAL); } @NotNull diff --git a/wise-api/src/main/java/com/wisemapping/rest/model/RestErrors.java b/wise-api/src/main/java/com/wisemapping/rest/model/RestErrors.java index 19dd0ab8..91fcc632 100644 --- a/wise-api/src/main/java/com/wisemapping/rest/model/RestErrors.java +++ b/wise-api/src/main/java/com/wisemapping/rest/model/RestErrors.java @@ -30,9 +30,6 @@ import org.springframework.validation.Errors; import org.springframework.validation.FieldError; import org.springframework.validation.ObjectError; -import jakarta.xml.bind.annotation.XmlAccessType; -import jakarta.xml.bind.annotation.XmlAccessorType; -import jakarta.xml.bind.annotation.XmlRootElement; import java.util.*; @JsonAutoDetect( @@ -47,13 +44,13 @@ public class RestErrors { private Errors errors; @JsonIgnore - private List gErrors; + private List globalError; @JsonIgnore - MessageSource messageSource; + private MessageSource messageSource; @JsonIgnore - Severity gSeverity; + private Severity globalSeverity; @Nullable @JsonIgnore @@ -67,8 +64,8 @@ public class RestErrors { this.errors = errors; this.messageSource = messageSource; - this.gErrors = this.processGlobalErrors(errors); - this.gSeverity = Severity.WARNING; + this.globalError = this.processGlobalErrors(errors); + this.globalSeverity = Severity.WARNING; } public RestErrors(@NotNull String errorMsg, @NotNull Severity severity) { @@ -78,9 +75,9 @@ public class RestErrors { public RestErrors(@NotNull String errorMsg, @NotNull Severity severity, @Nullable String debugInfo) { this._debugInfo = debugInfo; - this.gErrors = new ArrayList<>(); - this.gErrors.add(errorMsg); - this.gSeverity = severity; + this.globalError = new ArrayList<>(); + this.globalError.add(errorMsg); + this.globalSeverity = severity; } private List processGlobalErrors(@NotNull Errors errors) { @@ -123,7 +120,7 @@ public class RestErrors { @Nullable public String getGlobalSeverity() { - return this.gSeverity.toString(); + return this.globalSeverity.toString(); } @Nullable @@ -132,16 +129,16 @@ public class RestErrors { } public List getGlobalErrors() { - return gErrors; + return globalError; } @Override public String toString() { return "RestErrors{" + "errors=" + errors + - ", gErrors=" + gErrors + + ", gErrors=" + globalError + ", messageSource=" + messageSource + - ", gSeverity=" + gSeverity + + ", gSeverity=" + globalSeverity + ", _debugInfo='" + _debugInfo + '\'' + '}'; }