The following seems to work. Is this the way you’re supposed to determine if a user is an admin user or is there a better way?
boolean adminUser = false;
List<UserRole> urs = userSessionSource.getUserSession().getUser().getUserRoles();
for (UserRole ur : urs) {
if (ur.getRole().getType().equals(RoleType.SUPER)) {
adminUser = true;
}
}
if (adminUser) {
showNotification("Admin user logged in");
} else {
showNotification("NON-Admin user logged in");
}