private void checkAdmin(String username, String errmsg) throws AuthException {
    if (isAdmin(username)) {
      throw new AuthException(TSStatusCode.NO_PERMISSION, errmsg);
    }
  }
Checks if a user has admin privileges
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/auth/authorizer/BasicAuthorizer.java