User:Robchurch/Allow a group to edit regardless of protection
/**
* This allows members of the "supereditor" group to edit
* a page regardless of the protection setting
*/
$wgGroupPermissions['supereditor']['supereditor'] = true;
$wgExtensionFunctions[] = 'efSuperEditorSetup';
function efSuperEditorSetup() {
global $wgHooks;
$wgHooks['userCan'][] = 'efSuperEditor';
}
function efSuperEditor( $title, $user, $action, &$result ) {
if( $user->isAllowed( 'supereditor' ) )
$result = true;
return true;
}