7d56cd6635651dfd4c9926d062d92ad7b65a3e80
chmalee
  Wed Jun 3 14:52:52 2026 -0700
More myVariants changes: make the share to accept a comma-sep list of usernames, allow both the read/edit flag and the usernames setting to be editable after creation. When editing usernames, add a confirmation if the field is left blank that this will make the share viewable/editable by anyone with the link, refs #33808

diff --git src/hg/inc/myVariantsShare.h src/hg/inc/myVariantsShare.h
index 9fc2d3cab5d..4d6378834f5 100644
--- src/hg/inc/myVariantsShare.h
+++ src/hg/inc/myVariantsShare.h
@@ -97,24 +97,41 @@
 /* Look up a single share by token. Returns NULL if not found. */
 
 struct myVariantsShare *myVariantsGetSharesForOwner(struct sqlConnection *conn,
     char *ownerUser, char *db);
 /* Get all shares created by this user for the given assembly. */
 
 struct myVariantsShare *myVariantsGetSharesForUser(struct sqlConnection *conn,
     char *targetUser, char *db);
 /* Get all shares targeted at this user for the given assembly. */
 
 boolean myVariantsRevokeShare(struct sqlConnection *conn,
     char *shareToken, char *ownerUser);
 /* Delete a share record. ownerUser must match the share's owner.
  * Returns TRUE if a row was deleted, FALSE if not found or not owner. */
 
+boolean myVariantsSetSharePermission(struct sqlConnection *conn,
+    char *shareToken, char *ownerUser, int permission);
+/* Update a share's permission (0=read-only, 1=read-write). ownerUser must
+ * match the share's owner. Returns TRUE if a row was updated, FALSE if not
+ * found or not owner. */
+
+boolean myVariantsSetShareTargets(struct sqlConnection *conn,
+    char *shareToken, char *ownerUser, char *targetUser);
+/* Update a share's targetUser list (NULL for anyone with link). ownerUser
+ * must match the share's owner. Returns TRUE if a row was updated, FALSE if
+ * not found or not owner. */
+
+boolean myVariantsShareAllowsUser(struct myVariantsShare *share, char *userName);
+/* Return TRUE if userName may access share. TRUE when targetUser is empty
+ * (anyone with link); otherwise TRUE only if userName is non-empty and
+ * appears in the comma-separated targetUser list. NULL-safe. */
+
 #define MYVAR_SHARE_CGI_VAR "myVarShare"
 #define MYVAR_SHARED_CART_PREFIX "myVarShared_"
 
 char *myVariantsShareCartValue(struct myVariantsShare *share);
 /* Build JSON cart value string from a share record.
  * Caller must freeMem the result. */
 
 #endif /* MYVARIANTSSHARE_H */