Using Spring Security we use hasAuthority to conditionally execute code or conditionally display parts of page in jsp.
eg:
@PreAuthorize("hasAuthority('ROLE_TELLER')")
public Account post(Account account, double amount);
}
or (in jsp)
<sec:authorize access="hasAuthority('TAG_SAVE')">
.... content to display / evaluate
</sec:authorize>
I wanted to know how to handle a case when you want to show / execute something when not having Authority.
may something like
doesNotHaveAuthority('TAG_SAVE')
I am pretty sure, this is not an out of the blue use-case. Has anyone handle this in any way?