Topic on Extension talk:Lockdown

Restrict createpage-right in Project-Namespace

5
Finswimmer (talkcontribs)

Hello, what's the right way to restrict the right to create a page in the Project-namespace (NS_PROJECT) to a certain group, but allow all other to edit them.

I tried this:

$wgGroupPermissions['*']['edit'] = true;
$wgNamespacePermissionLockdown[NS_PROJECT]['createpage'] = array('sysop');

But it wont work. Still every logged in user can create pages in the project namespace.

76.68.137.45 (talkcontribs)

Did you ever get this to work?

Kghbln (talkcontribs)

Hmm... , I do not think this can be done since action "edit" includes action "createpage" (some sort of "rights inheritance"). However, I may still be proven wrong.

Halungg (talkcontribs)

I found a way using the Extension AbuseFilter with the following Filter and the "disallow" action:


(page_namespace = 0) &

(old_wikitext == "") &

!( 'sysop' in user_rights ) & !contains_any(added_lines, "redirect")


It is certainly not perfect and notifies the user only after hitting "save", but it works.

Rbirmann (talkcontribs)

I am trying to do something similar and indeed it does not seem to work. I want only members of a certain group to be able to create pages on the main namespace, but allow everyone else to edit those pages once they exist.

Here is what I tried:

$wgGroupPermissions['user']['createpage'] = true;
$wgGroupPermissions['creator']['createpage'] = true;
$wgNamespacePermissionLockdown['*']['createpage'] = array('user');
$wgNamespacePermissionLockdown[NS_MAIN]['createpage'] = array('creator');

But it does not work. All users can still create pages on the Main Namespace, even if they are not members of the 'creator' group.

Too bad....

Reply to "Restrict createpage-right in Project-Namespace"