public void requireGlobalPermission(User user, String request, Action perm, String namespace)
    throws IOException {
    AuthResult authResult;
    if (authManager.authorizeUserGlobal(user, perm)) {
      authResult = AuthResult.allow(request, "Global check allowed", user, perm, null);
      authResult.getParams().setNamespace(namespace);
      logResult(authResult);
    } else {
      authResult = AuthResult.deny(request, "Global check failed", user, perm, null);
      authResult.getParams().setNamespace(namespace);
      logResult(authResult);
      throw new AccessDeniedException(
        "Insufficient permissions for user '" + (user != null ? user.getShortName() : "null")
          + "' (global, action=" + perm.toString() + ")");
    }
  }
Checks that the user has the given global permission. The generated audit log message will
contain context information for the operation being authorized, based on the given parameters.
@param user      Active user to which authorization checks should be applied
@param request   Request type
@param perm      Action being requested
@param namespace The given namespace
hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessChecker.java