public void requireGlobalPermission(User user, String request, Action perm, TableName tableName,
    Map<byte[], ? extends Collection<byte[]>> familyMap, String filterUser) throws IOException {
    AuthResult result;
    if (authManager.authorizeUserGlobal(user, perm)) {
      result = AuthResult.allow(request, "Global check allowed", user, perm, tableName, familyMap);
    } else {
      result = AuthResult.deny(request, "Global check failed", user, perm, tableName, familyMap);
    }
    result.getParams().setTableName(tableName).setFamilies(familyMap);
    result.getParams().addExtraParam("filterUser", filterUser);
    logResult(result);
    if (!result.isAllowed()) {
      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 tableName  Affected table name.
@param familyMap  Affected column families.
@param filterUser User name to be filtered from permission as requested
hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessChecker.java