* Changed $wgGroupPermissions to more cut-n-paste-friendly format
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 19 Jun 2005 07:03:55 +0000 (07:03 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 19 Jun 2005 07:03:55 +0000 (07:03 +0000)
* 'developer' group deprecated by default

RELEASE-NOTES
UPGRADE
includes/DefaultSettings.php
includes/User.php

index 1a7530b..454260e 100644 (file)
@@ -298,6 +298,8 @@ Various bugfixes, small features, and a few experimental things:
 * (bug 2277) Added Friulian language file
 * Less gratuitous munging of content sample in delete summary
 * badaccess/badaccesstext to supercede sysop*, developer* messages
+* Changed $wgGroupPermissions to more cut-n-paste-friendly format
+* 'developer' group deprecated by default
 
 
 === Caveats ===
diff --git a/UPGRADE b/UPGRADE
index 07767be..2c56689 100644 (file)
--- a/UPGRADE
+++ b/UPGRADE
@@ -46,7 +46,7 @@ $wgWhitelistAccount has been replaced by the 'createaccount' permission
 key in $wgGroupPermissions. To emulate the old effect of setting:
   $wgWhitelistAccount['user'] = 0;
 set:
-  $wgGroupPermissions['*'] = array( 'read' ); // without createaccount
+  $wgGroupPermissions['*']['createaccount'] = false;
 
 If $wgWhitelistRead is set, things need to be funked around. This needs work.
 
index 6b9751d..2bba373 100644 (file)
@@ -679,16 +679,35 @@ $wgAutoblockExpiry                = 86400; # Number of seconds before autoblock entries expire
  * combined with the permissions of all groups that a given user is listed
  * in in the user_groups table.
  */
-$wgGroupPermissions = array(
-       '*'          => array( 'read', 'createaccount' ),
-       'user'       => array( 'read', 'move' ),
-       
-       'bot'        => array( 'bot' ),
-       'sysop'      => array( 'createaccount', 'patrol', 'protect', 'delete',
-                              'rollback', 'block', 'editinterface' ),
-       'bureaucrat' => array( 'userrights' ),
-       'developer'  => array( 'siteadmin' ),
-);
+$wgGroupPermissions = array();
+
+$wgGroupPermissions['*'    ]['createaccount']   = true;
+$wgGroupPermissions['*'    ]['read']            = true;
+
+$wgGroupPermissions['user' ]['move']            = true;
+$wgGroupPermissions['user' ]['read']            = true;
+
+$wgGroupPermissions['bot'  ]['bot']             = true;
+
+$wgGroupPermissions['sysop']['block']           = true;
+$wgGroupPermissions['sysop']['createaccount']   = true;
+$wgGroupPermissions['sysop']['delete']          = true;
+$wgGroupPermissions['sysop']['editinterface']   = true;
+$wgGroupPermissions['sysop']['import']          = true;
+$wgGroupPermissions['sysop']['importraw']       = true;
+$wgGroupPermissions['sysop']['patrol']          = true;
+$wgGroupPermissions['sysop']['protect']         = true;
+$wgGroupPermissions['sysop']['rollback']        = true;
+
+$wgGroupPermissions['bureaucrat']['userrights'] = true;
+
+/**
+ * The developer group is deprecated, but can be activated if need be
+ * to use the 'lockdb' and 'unlockdb' special pages. Those require
+ * that a lock file be defined and creatable/removable by the web
+ * server.
+ */
+# $wgGroupPermissions['developer']['siteadmin'] = true;
 
 
 
index 93bd950..4242b81 100644 (file)
@@ -1578,7 +1578,8 @@ class User {
                $rights = array();
                foreach( $groups as $group ) {
                        if( isset( $wgGroupPermissions[$group] ) ) {
-                               $rights = array_merge( $rights, $wgGroupPermissions[$group] );
+                               $rights = array_merge( $rights,
+                                       array_keys( array_filter( $wgGroupPermissions[$group] ) ) );
                        }
                }
                return $rights;