b53a97d26633a1f174a7031559a69d37e393379f
chmalee
  Fri May 1 14:19:19 2026 -0700
Allow myVariants tracks to be shared similar to google docs, read only and read+edit access by username or for all. Last write wins. Currently no history of changes, leaving that for the next version of the feature

diff --git src/hg/hgTracks/mainMain.c src/hg/hgTracks/mainMain.c
index c0d69df6bf6..3a56e42cd40 100644
--- src/hg/hgTracks/mainMain.c
+++ src/hg/hgTracks/mainMain.c
@@ -54,30 +54,35 @@
 cgiSpoof(&argc, argv);
 char * link = webTimeStampedLinkToResourceOnFirstCall("HGStyle.css",TRUE); // resource file link
 if (link)                                                                  // wrapped in html
     htmlSetStyle(link);
 
 oldVars = hashNew(10);
 
 if (cgiVarExists("hgt.redirectTool"))
     {
     // user has selected one of the tools in View > In external tools: Do not plot, just redirect.
     printf("Content-type: text/html\n\n");
     errAbortSetDoContentType(FALSE);
     cart = cartForSession(hUserCookie(), NULL, NULL);
     extToolRedirect(cart, cgiString("hgt.redirectTool"));
     }
+else if (cfgOptionBooleanDefault("doMyVariants", FALSE) && cgiVarExists("myVarShareCmd"))
+    {
+    cart = cartForSession(hUserCookie(), NULL, NULL);
+    myVariantsShareApiHandler(cgiString("myVarShareCmd"));
+    }
 else
     {
     httpHeaders = slPairNew("Cache-Control", "no-store");
     cartHtmlShell("UCSC Genome Browser v"CGI_VERSION, doMiddle, hUserCookie(), excludeVars, oldVars);
     }
 
 // TODO: better place for this ?
 webIncludeResourceFile("font-awesome.min.css");
 
 if (measureTiming)
     measureTime("Time to write and close cart");
 if (measureTiming)
     {
     fprintf(stdout, "<span class='timing'>Overall total time: %ld millis<br /></span>\n",
             clock1000() - enteredMainTime);