diff --git a/Dockerfile b/Dockerfile index 1b5912e..66a5563 100644 --- a/Dockerfile +++ b/Dockerfile @@ -68,7 +68,7 @@ RUN curl -L https://getcomposer.org/installer | php \ && php composer.phar install --no-dev RUN EXTS=`curl https://extdist.wmflabs.org/dist/extensions/ | awk 'BEGIN { FS = "\"" } ; {print $2}'` \ - && for i in SmiteSpam VisualEditor Scribunto LiquidThreads Cite WikiEditor LDAPProvider PluggableAuth LDAPAuthentication2 ParserFunctions TemplateData InputBox Widgets Variables RightFunctions PageInCat CategoryTree LabeledSectionTransclusion UserPageEditProtection Quiz Collection DeleteBatch LinkTarget HitCounters Math 3D MultimediaViewer TimedMediaHandler; do \ + && for i in Lockdown SmiteSpam VisualEditor Scribunto LiquidThreads Cite WikiEditor LDAPProvider PluggableAuth LDAPAuthentication2 ParserFunctions TemplateData InputBox Widgets Variables RightFunctions PageInCat CategoryTree LabeledSectionTransclusion UserPageEditProtection Quiz Collection DeleteBatch LinkTarget HitCounters Math 3D MultimediaViewer TimedMediaHandler; do \ FILENAME=`echo "$EXTS" | grep ^${i}-REL${WIKI_VERSION_STR}`; \ echo "Installing https://extdist.wmflabs.org/dist/extensions/$FILENAME"; \ curl -Ls https://extdist.wmflabs.org/dist/extensions/$FILENAME | tar xz -C /var/www/html/extensions; \ diff --git a/LocalSettings.php b/LocalSettings.php index 8730417..d4a4401 100644 --- a/LocalSettings.php +++ b/LocalSettings.php @@ -732,6 +732,105 @@ function loadenv($envName, $default = "") { +if (getenv('MEDIAWIKI_EXTENSIONS') && strpos(getenv('MEDIAWIKI_EXTENSIONS'), 'Lockdown') !== false) { + + wfLoadExtension( 'Lockdown' ); + + ##Test Page Lockdown + $wgSpecialPageLockdown['DeadendPages'] = [ 'user' ]; + $wgSpecialPageLockdown['DoubleRedirects'] = [ 'user' ]; + $wgSpecialPageLockdown['LongPages'] = [ 'user' ]; + $wgSpecialPageLockdown['AncientPages'] = [ 'user' ]; + $wgSpecialPageLockdown['LonelyPages'] = [ 'user' ]; + $wgSpecialPageLockdown['FewestRevisions'] = [ 'user' ]; + $wgSpecialPageLockdown['WithoutInterwiki'] = [ 'user' ]; + $wgSpecialPageLockdown['ProtectedPages'] = [ 'user' ]; + $wgSpecialPageLockdown['ProtectedTitles'] = [ 'user' ]; + $wgSpecialPageLockdown['ShortPages'] = [ 'user' ]; + $wgSpecialPageLockdown['UncategorizedCategories'] = [ 'user' ]; + $wgSpecialPageLockdown['UncategorizedFiles'] = [ 'user' ]; + $wgSpecialPageLockdown['UncategorizedPages'] = [ 'user' ]; + $wgSpecialPageLockdown['UncategorizedTemplates'] = [ 'user' ]; + $wgSpecialPageLockdown['UnusedCategories'] = [ 'user' ]; + $wgSpecialPageLockdown['UnusedFiles'] = [ 'user' ]; + $wgSpecialPageLockdown['UnusedTemplates'] = [ 'user' ]; + $wgSpecialPageLockdown['WantedCategories'] = [ 'user' ]; + $wgSpecialPageLockdown['WantedFiles'] = [ 'user' ]; + $wgSpecialPageLockdown['WantedPages'] = [ 'user' ]; + $wgSpecialPageLockdown['WantedTemplates'] = [ 'user' ]; + $wgSpecialPageLockdown['AllPages'] = [ 'user' ]; + $wgSpecialPageLockdown['PrefixIndex'] = [ 'user' ]; + $wgSpecialPageLockdown['Categories'] = [ 'user' ]; + $wgSpecialPageLockdown['CategoryTree'] = [ 'user' ]; + $wgSpecialPageLockdown['LinkSearch'] = [ 'user' ]; + $wgSpecialPageLockdown['ListRedirects'] = [ 'user' ]; + $wgSpecialPageLockdown['PagesWithProp'] = [ 'user' ]; + $wgSpecialPageLockdown['Search'] = [ 'user' ]; + $wgSpecialPageLockdown['TrackingCategories'] = [ 'user' ]; + ##$wgSpecialPageLockdown['UserLogin'] = [ 'user' ]; + $wgSpecialPageLockdown['ActiveUsers'] = [ 'user' ]; + $wgSpecialPageLockdown['AutoblockList'] = [ 'user' ]; + $wgSpecialPageLockdown['BlockList'] = [ 'user' ]; + $wgSpecialPageLockdown['ChangeEmail'] = [ 'user' ]; + $wgSpecialPageLockdown['ListGrants'] = [ 'user' ]; + $wgSpecialPageLockdown['LinkAccounts'] = [ 'user' ]; + $wgSpecialPageLockdown['PasswordPolicies'] = [ 'user' ]; + $wgSpecialPageLockdown['Preferences'] = [ 'user' ]; + $wgSpecialPageLockdown['ResetTokens'] = [ 'user' ]; + $wgSpecialPageLockdown['UnlinkAccounts'] = [ 'user' ]; + $wgSpecialPageLockdown['Contributions'] = [ 'user' ]; + $wgSpecialPageLockdown['ListGroupRights'] = [ 'user' ]; + $wgSpecialPageLockdown['ListUsers'] = [ 'user' ]; + $wgSpecialPageLockdown['UserRights'] = [ 'user' ]; + $wgSpecialPageLockdown['NewFiles'] = [ 'user' ]; + $wgSpecialPageLockdown['Log'] = [ 'user' ]; + $wgSpecialPageLockdown['NewPages'] = [ 'user' ]; + $wgSpecialPageLockdown['RecentChanges'] = [ 'user' ]; + $wgSpecialPageLockdown['RecentChangesLinked'] = [ 'user' ]; + $wgSpecialPageLockdown['Tags'] = [ 'user' ]; + $wgSpecialPageLockdown['Watchlist'] = [ 'user' ]; + $wgSpecialPageLockdown['ListFiles'] = [ 'user' ]; + $wgSpecialPageLockdown['ListDuplicatedFiles'] = [ 'user' ]; + $wgSpecialPageLockdown['MIMESearch'] = [ 'user' ]; + $wgSpecialPageLockdown['MediaStatistics'] = [ 'user' ]; + $wgSpecialPageLockdown['OrphanedTimedText'] = [ 'user' ]; + $wgSpecialPageLockdown['FileDuplicateSearch'] = [ 'user' ]; + $wgSpecialPageLockdown['Campaigns'] = [ 'user' ]; + $wgSpecialPageLockdown['ApiSandbox'] = [ 'user' ]; + $wgSpecialPageLockdown['BookSources'] = [ 'user' ]; + $wgSpecialPageLockdown['ExpandTemplates'] = [ 'user' ]; + $wgSpecialPageLockdown['NewMessages'] = [ 'user' ]; + $wgSpecialPageLockdown['PopularPages'] = [ 'user' ]; + $wgSpecialPageLockdown['Statistics'] = [ 'user' ]; + $wgSpecialPageLockdown['AllMessages'] = [ 'user' ]; + $wgSpecialPageLockdown['Version'] = [ 'user' ]; + $wgSpecialPageLockdown['DeletePage'] = [ 'user' ]; + $wgSpecialPageLockdown['Diff'] = [ 'user' ]; + $wgSpecialPageLockdown['EditPage'] = [ 'user' ]; + $wgSpecialPageLockdown['NewSection'] = [ 'user' ]; + $wgSpecialPageLockdown['PageHistory'] = [ 'user' ]; + $wgSpecialPageLockdown['PageInfo'] = [ 'user' ]; + $wgSpecialPageLockdown['PermanentLink'] = [ 'user' ]; + $wgSpecialPageLockdown['ProtectPage'] = [ 'user' ]; + $wgSpecialPageLockdown['Purge'] = [ 'user' ]; + $wgSpecialPageLockdown['Random'] = [ 'user' ]; + $wgSpecialPageLockdown['RandomInCategory'] = [ 'user' ]; + $wgSpecialPageLockdown['RandomRedirect'] = [ 'user' ]; + $wgSpecialPageLockdown['RandomRootpage'] = [ 'user' ]; + $wgSpecialPageLockdown['Redirect'] = [ 'user' ]; + $wgSpecialPageLockdown['MostLinkedCategories'] = [ 'user' ]; + $wgSpecialPageLockdown['MostLinkedFiles'] = [ 'user' ]; + $wgSpecialPageLockdown['MostLinkedPages'] = [ 'user' ]; + $wgSpecialPageLockdown['MostTranscludedPages'] = [ 'user' ]; + $wgSpecialPageLockdown['MostCategories'] = [ 'user' ]; + $wgSpecialPageLockdown['MostInterwikis'] = [ 'user' ]; + $wgSpecialPageLockdown['MostRevisions'] = [ 'user' ]; + $wgSpecialPageLockdown['ComparePages'] = [ 'user' ]; + $wgSpecialPageLockdown['Export'] = [ 'user' ]; + $wgSpecialPageLockdown['WhatLinksHere'] = [ 'user' ]; + + +} @include('/conf/CustomSettings.php'); diff --git a/docker-compose.yml b/docker-compose.yml index 421079c..2bb0b2b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -37,7 +37,7 @@ services: - MEDIAWIKI_DB_PASSWORD=password # uncomment 'MEDIAWIKI_ENABLE_SSL' to enable SSL support # - MEDIAWIKI_ENABLE_SSL=true - - MEDIAWIKI_EXTENSIONS=SmiteSpam,VisualEditor,WikiEditor,ParserFunctions,Cite,TemplateData,Scribunto,InputBox,Widgets,Maps,Math,LiquidThreads,Variables,RightFunctions,PageInCat,CategoryTree,LabeledSectionTransclusion,UserPageEditProtection,Quiz,UploadWizard,Collection,DynamicPageList,EmbedPage,UWUBCMessages,googleAnalytics,Renameuser,caliper,DeleteBatch,LinkTarget,HitCounters,GTag,3D,TimedMediaHandler + - MEDIAWIKI_EXTENSIONS=Lockdown,SmiteSpam,VisualEditor,WikiEditor,ParserFunctions,Cite,TemplateData,Scribunto,InputBox,Widgets,Maps,Math,LiquidThreads,Variables,RightFunctions,PageInCat,CategoryTree,LabeledSectionTransclusion,UserPageEditProtection,Quiz,UploadWizard,Collection,DynamicPageList,EmbedPage,UWUBCMessages,googleAnalytics,Renameuser,caliper,DeleteBatch,LinkTarget,HitCounters,GTag,3D,TimedMediaHandler - MEDIAWIKI_ALLOW_SITE_CSS_ON_RESTRICTED_PAGES=true # Add a logo to the wiki, can be relative paths to uploaded wiki images # Note: ICON (required) used by newer themes, LEGACY (optional) by older