Skip to content

Commit 8017a28

Browse files
committed
chore: mark "Image" field as required when user doesn't have DOWNLOAD_IMAGE authority
This the case for a series owners.
1 parent 2b5a93d commit 8017a28

File tree

1 file changed

+4
-1
lines changed
  • src/main/webapp/WEB-INF/views/series

1 file changed

+4
-1
lines changed

src/main/webapp/WEB-INF/views/series/info.html

+4-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,10 @@
9999
th:action="@{${ADD_IMAGE_SERIES_PAGE}(id=${series.id})}"
100100
th:object="${addImageForm}">
101101
<div class="form-group form-group-sm" th:classappend="${#fields.hasErrors('uploadedImage') ? 'has-error' : ''}">
102-
<label for="image" class="control-label col-sm-3" th:text="#{t_image}">
102+
<label for="image"
103+
class="control-label col-sm-3"
104+
th:classappend="${#authorization.expression('hasAuthority(''DOWNLOAD_IMAGE'')') ? '' : 'required-field'}"
105+
th:text="#{t_image}">
103106
Image
104107
</label>
105108
<div class="col-sm-9">

0 commit comments

Comments
 (0)