@Override
  public void deleteUser(String username) throws AuthException {
    checkAdmin(username, "Default administrator cannot be deleted");
    if (!userManager.deleteEntity(username)) {
      throw new AuthException(
          TSStatusCode.USER_NOT_EXIST, String.format("User %s does not exist", username));
    }
  }
Checks if a user has admin privileges
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/auth/authorizer/BasicAuthorizer.java