Manual talk:$wgRestrictionLevels
From MediaWiki.org
[edit] Help
Hi, just wondering if someone can help me!
I'm running the trunk version of mediawiki, and I attempted to add this variable.
The wiki works fine, so I know nothing is wrong, but when I try to protect a page, the new options do not show up. Any ideas?
The code I am using is: $wgRestrictionLevels = array ( , 'autoconfirmed', 'sysop', 'staff', 'developer'); $wgRestrictionTypes = array( 'edit', 'move');
I have created the "staff" and "developer" MediaWiki: Pages, and both userrgroups are on my wiki. I am also a member of both.
Also, a space has appeared below the existing levels, that is presumably for the new levels - there is just no text.
Thanks,
Bluegoblin7 09:52, 18 August 2008 (UTC)
- You need to add the correct MediaWiki: messages as well. The messages you need are "MediaWiki:Protect-level-groupname" and "MediaWiki:Restriction-level-groupname", replacing both instances of "groupname" with the name of the group. The first is the text displayed on the protection form, and the latter is displayed in Special:ProtectedPages. --Skizzerz 14:41, 18 August 2008 (UTC)
- I had done that already. It says that ^.
- I'm going to rewrite the page i think, its misleading
- Bluegoblin7 14:53, 18 August 2008 (UTC)
[edit] sysop
I think it would be useful to add a note about the default value "sysop". As the description says, the values should be permissions, not group names. However, "sysop" is no permission, but a only a group name, so it makes people think group names were allowed. I wondered why it works for "sysop", but not for e.g. "bureaucrat". Looking at the source code, I found out that "sysop" is rewritten to "protect" for "Backwards compatibility". I checked this by setting the protection to "move=sysop" and then removing the "protect" permission from the sysop group. Indeed I could no longer move the page. So if you restrict a page to be edited/moved only by sysops, anyone with the "protect" permission will be able to edit/move it (which makes sense, they could as well unprotect the page if they wanted to). This underlines that you can't use group names, except for "sysop". --Robb1989 15:38, 18 April 2009 (UTC)