public static boolean hasAdministratorAccess(ServletContext servletContext,
    HttpServletRequest request, HttpServletResponse response) throws IOException {
    Configuration conf = (Configuration) servletContext.getAttribute(CONF_CONTEXT_ATTRIBUTE);
    AccessControlList acl = (AccessControlList) servletContext.getAttribute(ADMINS_ACL);

    return hasAdministratorAccess(conf, acl, request, response);
  }
Does the user sending the HttpServletRequest has the administrator ACLs? If it isn't the case,
response will be modified to send an error to the user.
@param servletContext the {@link ServletContext} to use
@param request        the {@link HttpServletRequest} to check
@param response       used to send the error response if user does not have admin access.
@return true if admin-authorized, false otherwise
@throws IOException if an unauthenticated or unauthorized user tries to access the page
hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java