diff --git a/wise-editor/src/main/webapp/samples/sample3.xml b/wise-editor/src/main/webapp/samples/sample3.xml new file mode 100644 index 00000000..41060d97 --- /dev/null +++ b/wise-editor/src/main/webapp/samples/sample3.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/BaseController.java b/wise-webapp/src/main/java/com/wisemapping/rest/BaseController.java index 4096738f..9e7700b4 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/BaseController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/BaseController.java @@ -63,5 +63,10 @@ public class BaseController { return new RestErrors(ex.getErrors(), messageSource); } + @ExceptionHandler(com.wisemapping.exceptions.AccessDeniedSecurityException.class) + @ResponseStatus(HttpStatus.BAD_REQUEST) + public RestErrors handleSecurityErrors(@NotNull ValidationException ex) { + return new RestErrors(ex.getErrors(), messageSource); + } }