How to check user authority or permission in Java Code ? For example - I want to show or hide button for user depending on role. There are annotations like:
Strangely enough, I don't think there is a standard solution to this problem, as the spring-security access control is expression based, not java-based. you might check the source code for
DefaultMethodSecurityExpressionHandler to see if you can re-use something they are doing there