https://bugzilla.wikimedia.org/show_bug.cgi?id=30208

--- Comment #26 from Max Semenik <[email protected]> 2011-08-06 07:38:25 
UTC ---
(In reply to comment #25)
> (In reply to comment #23)
> 
> > This can be done with a one-line hook, no changes in core are needed, I 
> > think.
> 
> 
> [[mw:Manual:Preventing_access#Restrict_page_creation_in_certain_namespaces]]
> seems to say that they would have to use an extension (which is beta and would
> need a thorough security review and make sure it can scale to our size) or a
> core change. That would be up to the developers however.

Cough cough.

$wgHooks['userCan'][] = 'efBlockNoobs';

function efBlockNoobs( &$title, &$user, $action, &$result ) {
    if ( $action = 'create' && $title->getNamespace() == NS_MAIN &&
$user->isNewbie() ) {
        $result = false;
        return wfMsg( 'noobs-go-away' );
    }
    return true;
}

Cough.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to