We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 051a651 commit f4b6e3dCopy full SHA for f4b6e3d
src/main/java/ru/mystamps/web/controller/SeriesController.java
@@ -207,6 +207,12 @@ public String processInput(
207
request.removeAttribute(DownloadImageInterceptor.ERROR_CODE_ATTR_NAME);
208
}
209
210
+ // To ensure that user without permission can't save downloaded image, we clear this image
211
+ // TODO: try to not download file in the interceptor if user doesn't have permissions
212
+ if (!SecurityContextUtils.hasAuthority(Authority.DOWNLOAD_IMAGE)) {
213
+ form.setDownloadedImage(null);
214
+ }
215
+
216
if (result.hasErrors()) {
217
String lang = LocaleUtils.getLanguageOrNull(userLocale);
218
0 commit comments