Limiting account creation on osmf wiki
[chef.git] / cookbooks / mediawiki / templates / default / LocalSettings.php.erb
index d03b78cf9f07a2bb04ffb72a396f392d8c1e9099..9f6ecb217a583ba28102a7a26e0a50d5e6fac277 100644 (file)
@@ -167,6 +167,12 @@ $wgGroupPermissions['bureaucrat']['deletelogentry'] = true;
 $wgGroupPermissions['bureaucrat']['deleterevision'] = true;
 $wgGroupPermissions['bureaucrat']['suppressrevision'] = true;
 $wgGroupPermissions['bureaucrat']['suppressionlog'] = true;
+
+<% if @mediawiki[:private_accounts] -%>
+#Prevent new user registrations except by existing users
+$wgGroupPermissions['*']['createaccount'] = false;
+$wgGroupPermissions['user']['createaccount'] = true;
+<% end -%>
 <% if @mediawiki[:private] -%>
 
 #Disable reading by anonymous users