929bf2136f6b12ad81e170c68ec982909c473ba6 chmalee Wed Oct 1 16:41:33 2025 -0700 Let auth table name for apiKeys be configued in hg.conf, refs #36428 diff --git src/hg/hgHubConnect/hgHubConnect.c src/hg/hgHubConnect/hgHubConnect.c index f37d3bde323..3d4f8333071 100644 --- src/hg/hgHubConnect/hgHubConnect.c +++ src/hg/hgHubConnect/hgHubConnect.c @@ -411,32 +411,33 @@ jsInline("hubSearchTree.init(false);"); } errCatchEnd(errCatch); if (errCatch->gotError || errCatch->gotWarning) { printf("hubCheck timed out after running for %d minute%s. Please try on a Unix command line", hubCheckTimeout / 60, hubCheckTimeout/60 > 1 ? "s" : ""); ret = 1; } errCatchFree(&errCatch); return ret; } static char *getApiKey(char *userName) /* Grab the already created api key if it exists */ { +char *tableName = cfgOptionDefault("authTableName", AUTH_TABLE_DEFAULT); struct sqlConnection *conn = hConnectCentral(); -struct dyString *query = sqlDyStringCreate("select apiKey from %s where userName='%s'", HUBSPACE_AUTH_TABLE, userName); +struct dyString *query = sqlDyStringCreate("select apiKey from %s where userName='%s'", tableName, userName); char *apiKey = sqlQuickString(conn, dyStringCannibalize(&query)); hDisconnectCentral(&conn); return apiKey; } void printApiKeySection() { puts("