From 17e898e3a9d1acd8af098e5c61d3b7ef63714f77 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Tue, 16 Feb 2021 13:36:33 +0100 Subject: [PATCH] Allow to configure privateness Closes https://git.autonomic.zone/coop-cloud/mediawiki/issues/18. --- .env.sample | 2 ++ LocalSettings.php.tmpl | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/.env.sample b/.env.sample index e01aad3..e28aa04 100644 --- a/.env.sample +++ b/.env.sample @@ -11,6 +11,8 @@ MEDIAWIKI_EMAIL_CONTACT="info@wiki.example.com" MEDIAWIKI_EMAIL_FROM="wiki@wiki.example.com" MEDIAWIKI_LOGO_FILE='$wgResourceBasePath/resources/assets/wiki.png' +MEDIAWIKI_IS_PRIVATE=1 + ## SMTP #SMTP_HOST=postfix_relay_app #SMTP_HOST=mailu_front diff --git a/LocalSettings.php.tmpl b/LocalSettings.php.tmpl index 45c4e95..b85d9cc 100644 --- a/LocalSettings.php.tmpl +++ b/LocalSettings.php.tmpl @@ -120,7 +120,11 @@ $wgDiff3 = "/usr/bin/diff3"; # The following permissions were set based on your choice in the installer $wgGroupPermissions['*']['createaccount'] = false; $wgGroupPermissions['*']['edit'] = false; +{{ if eq (env "MEDIAWIKI_IS_PRIVATE") "1" }} $wgGroupPermissions['*']['read'] = false; +{{ else }} +$wgGroupPermissions['*']['read'] = true; +{{ end }} ## Default skin: you can change the default skin. Use the internal symbolic ## names, ie 'vector', 'monobook':