Hey everyone, I am doing a project in grails and j...
# questions
u
Hey everyone, I am doing a project in grails and just wondered if there is any way to conditionally render something depending on the user role using taglib, something like
Copy code
<sec:ifAnyGranted roles="ROLE_ADMIN">
    <button>Admin Action</button>
</sec:ifAnyGranted>
I have this import at the top of the page, however it doesn't seem to work
Copy code
<%@ taglib prefix="sec" uri="<http://grails.org/plugins/spring-security-core>" %>
I do have spring security in the dependencies in build.gradle and refreshed the build I'd appreciate any help or guidance with that My grails version is 6.2.3
j
https://apache.github.io/grails-spring-security/6.1.x/index.html#securityTagLib is the version used with 6.2.3, the docs are likely the same
u
The previous doc helped me a lot, it solved my issue, thank you so much James!
🚀 1