* Changed $wgGroupPermissions to more cut-n-paste-friendly format
* 'developer' group deprecated by default
This commit is contained in:
parent
a991975c9a
commit
684c0ba6ae
4 changed files with 34 additions and 12 deletions
|
|
@ -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 ===
|
||||
|
|
|
|||
2
UPGRADE
2
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.
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue