74f1ce41ab30aa506ea6c1bd879e6d42ac596d55 hiram Wed Sep 25 12:24:12 2019 -0700 hard code a list of tables to check for protected data refs #24208 diff --git src/hg/hubApi/dataApi.h src/hg/hubApi/dataApi.h index f84add3..bc580df 100644 --- src/hg/hubApi/dataApi.h +++ src/hg/hubApi/dataApi.h @@ -42,30 +42,32 @@ /* error return codes */ #define err206 206 #define err206Msg "Partial Content" #define err301 301 #define err301Msg "Moved Permanently" #define err400 400 #define err400Msg "Bad Request" #define err403 403 #define err403Msg "Forbidden" #define err404 404 #define err404Msg "Not Found" #define err415 415 #define err415Msg "Unsupported track type" #define err429 429 #define err429Msg "Too Many Requests" +#define err500 500 +#define err500Msg "Internal Server Error" /* list of all potential arguments */ #define argHubUrl "hubUrl" #define argGenome "genome" #define argTrackLeavesOnly "trackLeavesOnly" #define argTrack "track" #define argChrom "chrom" #define argStart "start" #define argEnd "end" #define argMaxItemsOutput "maxItemsOutput" #define argJsonOutputArrays "jsonOutputArrays" /* valid argument listings to verify extraneous arguments * initialized in hubApi.c */ @@ -206,31 +208,31 @@ struct asColumn *columnEl); /* print out the SQL schema for this trackDb */ void bigColumnTypes(struct jsonWrite *jw, struct sqlFieldType *fiList, struct asObject *as); /* show the column types from a big file autoSql definitions */ boolean trackHasData(struct trackDb *tdb); /* check if this is actually a data track: * TRUE when has data, FALSE if has no data * When NO trackDb, can't tell at this point, will check that later */ #define trackHasNoData(tdb) (!trackHasData(tdb)) -boolean protectedTrack(struct trackDb *tdb); +boolean protectedTrack(struct trackDb *tdb, char *trackName); /* determine if track is off-limits protected data */ /* ######################################################################### */ /* functions in getData.c */ void apiGetData(char *words[MAX_PATH_INFO]); /* 'getData' function, words[1] is the subCommand */ /* ######################################################################### */ /* functions in list.c */ void apiList(char *words[MAX_PATH_INFO]); /* 'list' function words[1] is the subCommand */ #endif /* DATAAPH_H */