Use Case:
Need to hide "save button" on input control Dailog based on logged in user Role.
example:
Role: superuser -> display
user -> hide
Resolution:
You need to add below taglib in /WEB-INF/jsp/modules/viewReport/ViewReport.jsp after
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="authz" uri="http://www.springframework.org/security/tags" %> Then need to locate <button id="save"... and add open and end tag as below. <authz:authorize ifAnyGranted="ROLE_ADMINISTRATOR"> <button id="save" class="button action up" ${isReportReadOnly ? 'disabled="disabled"':''}><span class="wrap"><spring:message code="button.save" javaScriptEscape="true"/> <span class="icon"></span></span></button> </authz:authorize>
You can add where ever you see <button id="save"...>
Recommended Comments
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now