anchor.diff:  # Only Allow Signed-in users to edit
   $wgGroupPermissions['*']['edit'] = false;
   
  -# Only allow autoconfirmed for a few actions
  -$wgGroupPermissions['user']['move'] = false;
  -$wgGroupPermissions['user']['movefile'] = false;
  -$wgGroupPermissions['user']['move-categorypages'] = false;
  -$wgGroupPermissions['user']['upload'] = false;
  -$wgGroupPermissions['autoconfirmed']['move'] = true;
  -$wgGroupPermissions['autoconfirmed']['movefile'] = true;
  -$wgGroupPermissions['autoconfirmed']['move-categorypages'] = true;
  -$wgGroupPermissions['autoconfirmed']['upload'] = true;
  -
   # Allow bureaucrat group access to oversight options
   $wgGroupPermissions['bureaucrat']['hideuser'] = true;
   $wgGroupPermissions['bureaucrat']['deletelogentry'] = true;
  
positive.code: $wgGroupPermissions['*']['createaccount'] = false;
  $wgGroupPermissions['user']['createaccount'] = true;
  <% end -%>
  <% if @mediawiki[:private_site] -%>
  
  # Disable reading by anonymous users
  $wgGroupPermissions['*']['read'] = false;
  
  
negative.code: $wgReadOnly = "<%= @mediawiki[:site_readonly] %>";
  <% end -%>
  
  # load extensions
  <% Dir.glob("#{@directory}/LocalSettings.d/*.php") do |file| -%>
  <%= "require_once('#{file}');" %>
  <% end -%>
  
  <% if not(@mediawiki[:private_accounts]) and not(@mediawiki[:private_site]) -%>
  # require user confirmation for certain actions
  $wgGroupPermissions['user']['move'] = false;
  $wgGroupPermissions['user']['movefile'] = false;
  $wgGroupPermissions['user']['move-categorypages'] = false;
  $wgGroupPermissions['user']['upload'] = false;
  $wgGroupPermissions['autoconfirmed']['move'] = true;
  $wgGroupPermissions['autoconfirmed']['movefile'] = true;
  $wgGroupPermissions['autoconfirmed']['move-categorypages'] = true;
  $wgGroupPermissions['autoconfirmed']['upload'] = true;
  # Autopromote users to autoconfirmed
  $wgAutoConfirmAge = 345600; // 4 days
  $wgAutoConfirmCount = 10;
  
  # user group "confirmed" with identical rights as "autoconfirmed", but assigned manually by sysops
  $wgGroupPermissions['confirmed'] = $wgGroupPermissions['autoconfirmed'];
  $wgAddGroups['sysop'][] = 'confirmed';
  $wgRemoveGroups['sysop'][] = 'confirmed';
  <% end -%>
  
  <% if @mediawiki[:private_accounts] or @mediawiki[:private_site] -%>
  # disable automatic confirmation of users, grant all "autoconfirmed" rights to all users
  $wgAutoConfirmAge = 0;
  $wgAutoConfirmCount = 0;
  $wgGroupPermissions['user'] = array_merge( $wgGroupPermissions['user'], $wgGroupPermissions['autoconfirmed'] );
  
  unset( $wgGroupPermissions['autoconfirmed'] );
  unset( $wgRevokePermissions['autoconfirmed'] );
  unset( $wgAddGroups['autoconfirmed'] );
  unset( $wgRemoveGroups['autoconfirmed'] );
  unset( $wgGroupsAddToSelf['autoconfirmed'] );
  unset( $wgGroupsRemoveFromSelf['autoconfirmed'] );
  <% end -%>
  