.. java:import:: org.json JSONArray Role ==== .. java:package:: io.aalam.common :noindex: .. java:type:: public class Role This class helps the application to check the authority of the user over a request resource. Fields ------ log ^^^ .. java:field:: static final Logger log :outertype: Role Methods ------- isClientAuthorized ^^^^^^^^^^^^^^^^^^ .. java:method:: public static boolean isClientAuthorized(HttpRequest request, String grp, String name) :outertype: Role Check if the user request a URL has permission :param request: The request object that the action handler receives :param grp: The permission group name :param name: The permission name :return: True if the user has the permission else False isUserAdmin ^^^^^^^^^^^ .. java:method:: public static boolean isUserAdmin(String userEmail) throws Exception :outertype: Role Check if the requesting user is an admin :param userEmail: The email id of the user requesting a URL :return: True if the user is admin else False isUserAdmin ^^^^^^^^^^^ .. java:method:: public static boolean isUserAdmin(HttpRequest request) throws Exception :outertype: Role Check if the requesting user is an admin :param request: The request object that the action handler receives :return: True if the user is admin else False