0
我希望把JavaScript代码的一部分取决于下面的权限,这是freemarker代码。我可以使用百里香弹簧安全像jstl
<script type="text/javascript"></br>
var openAuthorityOperatorData = false;
$(function() {
$('#dlg_operator_auth_search_form').dialog({
autoOpen: false,
width: 500<@security.authorize access="hasRole('AUHOA00000')"> + 450</@security.authorize>,
height: 550,
dialogClass: 'dialog-shadow',
modal: false,
resizable: false...
})});
</script>
随着thymleaf,我只能发现,把权力属性为脚本元素像下面的方法。
<script sec:authorize="hasAnyRole('AUCOP0000x','AUUOP0000x')" type="text/javascript">
$(function() {
});
</script>
如果我不能使用类似上面的代码,我可以使用JSTL与thymeleaf要达到的目标?