759368142eec396d7b54ad72dc94a38459d1e3bf chmalee Tue Dec 17 16:57:35 2024 -0800 Add a table with userName,quota to hgcentral so hubspace can have user-defined quotas, refs #31058 diff --git src/hg/inc/userdata.h src/hg/inc/userdata.h index 3c2226c..e51154c 100644 --- src/hg/inc/userdata.h +++ src/hg/inc/userdata.h @@ -22,37 +22,34 @@ char *userName; // for convenience time_t lastModified; // actually last access time but this works struct userFiles *fileList; // list of files (tracks) in the hub }; char *getUserName(); /* Query the right system for the users name */ char *emailForUserName(char *userName); /* Fetch the email for this user from gbMembers hgcentral table */ //TODO: this should probably come from hg.conf: #define HUB_SPACE_URL "https://hgwdev.gi.ucsc.edu/hubspace" // the various quota helper variables: -#define HUB_SPACE_DEFAULT_QUOTA_BYTES 1000000000 +#define HUB_SPACE_DEFAULT_QUOTA_BYTES 10000000000 #define HUB_SPACE_DEFAULT_QUOTA HUB_SPACE_DEFAULT_QUOTA_BYTES // for defining the quota in hg.conf #define HUB_SPACE_CONF_QUOTA_VAR "hubspace.quota" -// path to hg.conf file that has a list of hubspace.quota.userName entries -// for special per user quotas: -#define HUB_SPACE_QUOTA_LIST_VAR "hubspace.quotaList" char *webDataDir(char *userName); /* Return a web accesible path to the userDataDir, this is different from the full path tusd uses */ char *getDataDir(char *userName); /* Return the full path to the user specific data directory, can be configured via hg.conf * on hgwdev, this is /data/apache/userdata/userStore/hash/userName/ * on the RR, this is /userdata/userStore/hash/userName/ */ char *stripDataDir(char *fname, char *userName); /* Strips the getDataDir(userName) off of fname */ char *prefixUserFile(char *userName, char *fname, char *parentDir); /* Allocate a new string that contains the full per-user path to fname, NULL otherwise. * parentDir is optional and will go in between the per-user dir and the fname */