User:Robchurch/Allow a group to edit regardless of protection

From MediaWiki.org
Jump to: navigation, search
/**
 * 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;
}
Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox