e9a3e487007cfbc88d465800ba82db2a99202a7b
chmalee
  Fri Jan 10 15:33:47 2025 -0800
Require both storeUserFiles and showHubApiKey to be true in hg.conf before printing the hubtools api key generation section on the hub development tab of hgHubConnect

diff --git src/hg/hgHubConnect/hgHubConnect.c src/hg/hgHubConnect/hgHubConnect.c
index b9b2492..5a8e3f3 100644
--- src/hg/hgHubConnect/hgHubConnect.c
+++ src/hg/hgHubConnect/hgHubConnect.c
@@ -555,31 +555,32 @@
         timeStatus = "ON";
     }
 
 printf("<b style='font-size:90%%'>Show load times: %s</b> &nbsp;", timeStatus);
 printf("<button type='submit' name='measureTiming' value='%s'>Change to: %s</button>", timeVal, timeLabel);
 
 printf("<div class='help'>Current setting: %s</div>\n", timeDesc);
 
 puts("</FORM>");
 puts("</div>"); // margin-left
 puts("</div>"); // tabSection
 
 jsOnEventById("click", "hubValidateButton", "makeIframe(event)");
 
 // API Key section 
-if (cfgOptionBooleanDefault("showHubApiKey", FALSE)) // This should probably not be shown on mirrors, so default to FALSE
+
+if (cfgOptionBooleanDefault("storeUserFiles", FALSE) && cfgOptionBooleanDefault("showHubApiKey", FALSE)) // This should probably not be shown on mirrors, so default to FALSE
     printApiKeySection();
 puts("</div>"); // hub developement tab
 
 }
 
 void printSearchAndFilterBoxes(int searchEnabled, char *hubSearchTerms, char *dbFilter)
 /* Create the text boxes for search and database filtering along with the required
  * javscript */
 {
 printf("<FORM ACTION=\"%s\" NAME=\"searchHubForm\">\n",  "../cgi-bin/hgHubConnect");
 if (searchEnabled)
     {
     cgiMakeHiddenVar(hgHubDoSearch, "on");
     cgiMakeHiddenVar(hgHubDbFilter, "");
     cartSaveSession(cart);