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':