Many a time we face the requirement where we have to check if the logged in user have Admin role or not on JSP.
To do so, it is quite easy and can be done in just simple steps. Let's see how can one know if the logged in user is admin or not in JSP:
You can find whether logged in user is of Administrator Role on JSP or not by using following code:
boolean isAdminUser=permissionChecker.isOmniadmin();
If permissionChecker is not defined you can add following code in the JSP:
PermissionChecker permissionChecker = PermissionThreadLocal.getPermissionChecker();
0 Comment(s)