import org.apache.shiro.SecurityUtils;
...
SecurityUtils.subject?.principal
Check authenticated users role:
if (SecurityUtils.subject?.hasRole('RoleName'))
{
//TODO Something
}
Logout link in GSP:
just call /auth/signOut :)
I'll add more code examples in the future, and if you can't find something, you can ask in comments...
Комментариев нет:
Отправка комментария