Skip to content

Commit

Permalink
update Lockdown extension
Browse files Browse the repository at this point in the history
  • Loading branch information
tuehoang committed Sep 21, 2023
1 parent ba919c2 commit 0fd04b1
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down
99 changes: 99 additions & 0 deletions LocalSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0fd04b1

Please sign in to comment.