The sec:authorize attribute renders its content when the attribute expression is evaluated to true
<div sec:authorize="hasRole('ROLE_ADMIN')">
Content for administrators
</div>
<div sec:authorize="hasRole('ROLE_USER')">
Content for users
</div>
The sec:authentication attribute is used to print logged user roles:
Roles: <span sec:authentication="principal.authorities">ROLE_USER, ROLE_ADMIN</span>