Reputation: 778
I am trying to authorize access to some buttons to some specific lvl of authority. I have seen other questions, but all solutions that i saw did not work.
i have doing:
<div class="col-sm-2" sec:authorize="hasRole('ROLE_ADMIN')">
<a href="#"><button type="button" class="btn btn-danger"> <b>Approve Plan </b></button></a>
</div>
i have also tested.
sec:authorize="hasRole('ADMIN')"
sec:authorize="hasRole('APPROVER')"
sec:authorize="hasAuthority('ADMIN')"
The button is always shown independent of the user authority thought it should be visible only to approver.
Upvotes: 0
Views: 441