Revision: 12539
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at March 18, 2009 13:33 by lucastex
Initial Code
<g:isLoggedIn> Only logged users (no matter witch roles) will see this text. This is useful to build the "Welcome ..." text and the logout link! </g:isLoggedIn> <g:isNotLoggedIn> Only anonymous users will see this. This is nice to build your "login" or "registration" link! </g:isNotLoggedIn> <!-- Let's pretend we are logged as our 'god' user --> <g:loggedInUserInfo field="username"/> <!-- will show 'god' --> <g:loggedInUserInfo field="email"/> <!-- will show '[email protected]' --> <g:loggedInUserInfo field="userRealName"/> <!-- will show 'god almighty' --> <g:ifAllGranted role="ROLE_ADMIN,ROLE_USER"> This information will be available for admins whom have the ROLE_USER associated either. </g:ifAllGranted> <g:ifAnyGranted role="ROLE_ADMIN,ROLE_USER"> This information will be available for any logged admin or user. </g:ifAnyGranted> <g:ifNotGranted role="ROLE_ADMIN"> All sessions that have the ROLE_ADMIN associated will not see this message! </g:ifNotGranted>
Initial URL
Initial Description
Initial Title
Using the Acegi Taglib
Initial Tags
groovy
Initial Language
HTML