4a12b8e105ea5b518de2c1ce33c1b94e3df09a2e hiram Mon Jun 25 10:56:10 2012 -0700 make the wiki track read only be an option in hg.conf diff --git src/hg/inc/wikiTrack.h src/hg/inc/wikiTrack.h index f74dda0..33d5e00 100644 --- src/hg/inc/wikiTrack.h +++ src/hg/inc/wikiTrack.h @@ -100,30 +100,31 @@ /* Print out wikiTrack. Separate fields with sep. Follow last field with lastSep. */ #define wikiTrackTabOut(el,f) wikiTrackOutput(el,f,'\t','\n'); /* Print out wikiTrack as a line in a tab-separated file. */ #define wikiTrackCommaOut(el,f) wikiTrackOutput(el,f,',',','); /* Print out wikiTrack as a comma separated list including final comma. */ /* -------------------------------- End autoSql Generated Code -------------------------------- */ /* configuration variables */ #define CFG_WIKI_URL "wikiTrack.URL" #define CFG_WIKI_BROWSER "wikiTrack.browser" #define CFG_WIKI_EDITORS "wikiTrack.editors" #define CFG_WIKI_DB_LIST "wikiTrack.dbList" +#define CFG_WIKI_TRACK_READ_ONLY "wikiTrack.readOnly" /* name of database table in hgcentral */ #define WIKI_TRACK_TABLE "wikiTrack" /* trackDb settings */ #define WIKI_TRACK_LABEL "Wiki Track" #define WIKI_TRACK_LONGLABEL "Wiki Track user annotations" #define WIKI_TRACK_PRIORITY 99.99 /* hgc variables */ #define G_CREATE_WIKI_ITEM "htcCreateWikiItem" #define G_ADD_WIKI_COMMENTS "htcAddWikiComments" #define G_DELETE_WIKI_ITEM "htcDeleteWikiItem" /* hgc and hgGene variables */ @@ -137,30 +138,33 @@ #define NEW_ITEM_STRAND "wikiItemStrand" #define NEW_ITEM_CLASS "wikiItemClass" #define NEW_ITEM_CATEGORY "[[Category:Genome Annotation]]" #define ITEM_NOT_CLASSIFIED "Not classified" #define NO_ITEM_COMMENT_SUPPLIED "(no initial description supplied)" #define DEFAULT_BROWSER "genome.ucsc.edu" #define TEST_EMAIL_VERIFIED "GenomeAnnotation:TestEmailVerified" #define EMAIL_NEEDS_TO_BE_VERIFIED \ "You must confirm your e-mail address before editing" #define USER_PREFERENCES_MESSAGE \ "Please set and validate your e-mail address through your" #define GENE_CLASS "Genes and Gene Prediction Tracks" #define LOGIN_EXPIRED \ "You do not have permission to edit pages, for the following reasons:" +boolean wikiTrackReadOnly(); +/* return TRUE if wiki track is in Read-Only mode, default answer is FALSE */ + boolean wikiTrackEnabled(char *database, char **wikiUserName); /*determine if wikiTrack can be used, and is this user logged into the wiki ?*/ char *wikiTrackGetCreateSql(char *tableName); /* return sql create statement for wiki track with tableName */ char *wikiDbName(); /* return name of database where wiki track is located currently this is central.db but the future may be configurable */ struct sqlConnection *wikiConnect(); /* connect to db where wikiTrack table is located * currently this is hConnectCentral() but the future may be * configurable */