Role¶
-
public class
Role
¶ This class helps the application to check the authority of the user over a request resource.
Methods¶
isClientAuthorized¶
-
public static boolean
isClientAuthorized
(HttpRequest request, String grp, String name)¶ Check if the user request a URL has permission
Parameters: - request – The request object that the action handler receives
- grp – The permission group name
- name – The permission name
Returns: True if the user has the permission else False
isUserAdmin¶
isUserAdmin¶
-
public static boolean
isUserAdmin
(HttpRequest request)¶ Check if the requesting user is an admin
Parameters: - request – The request object that the action handler receives
Returns: True if the user is admin else False