Skip to content

Commit 05f975b

Browse files
committed
refactor(/series/{id}): fix inclusion of a file in a rare case when user is allowed to import sales but not view it.
1 parent c4d9e27 commit 05f975b

File tree

1 file changed

+7
-12
lines changed
  • src/main/webapp/WEB-INF/views/series

1 file changed

+7
-12
lines changed

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

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -770,19 +770,14 @@ <h5 th:text="#{t_add_info_who_selling_series}">Add info about selling/buying thi
770770
<script src="http://yandex.st/jquery/1.9.1/jquery.min.js" th:src="${JQUERY_JS}"></script>
771771
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" th:src="${BOOTSTRAP_JS}"></script>
772772

773-
<!--/*/
774-
<th:block sec:authorize="hasAuthority('VIEW_SERIES_SALES')">
775-
/*/-->
776-
<script src="../../../../javascript/DateUtils.js" th:src="${DATE_UTILS_JS}"></script>
777-
<script src="../../../../javascript/series/info.js" th:src="${SERIES_INFO_JS}"></script>
778-
<!--/*/
779-
</th:block>
780-
/*/-->
773+
<script sec:authorize="hasAnyAuthority('VIEW_SERIES_SALES', 'IMPORT_SERIES_SALES')"
774+
src="../../../../javascript/DateUtils.js"
775+
th:src="${DATE_UTILS_JS}"></script>
781776

782-
<!--/*
783-
NOTE: It won't work properly, if user can import a sale but can't view it because
784-
SeriesSaleImportForm uses DateUtils.formatDateToDdMmYyyy() from DateUtils.js file.
785-
*/-->
777+
<script sec:authorize="hasAuthority('VIEW_SERIES_SALES')"
778+
src="../../../../javascript/series/info.js"
779+
th:src="${SERIES_INFO_JS}"></script>
780+
786781
<!--/*/
787782
<th:block sec:authorize="hasAuthority('IMPORT_SERIES_SALES')">
788783
/*/-->

0 commit comments

Comments
 (0)