Page MenuHomePhabricator

Cannot set USER_GROUP in UI on Special:UserRights. Works in 1.15, not in 1.15.1
Closed, DeclinedPublic

Description

Author: tim

Description:
I have the following lines in LocalSettings.php:

developer pages

$wgGroupPermissions[ 'Dev Team' ][ 'ns100_read' ] = true;
$wgGroupPermissions[ 'Dev Team' ][ 'ns100_edit' ] = true;
$wgGroupPermissions[ 'Dev Team' ][ 'ns100_create' ] = true;
$wgGroupPermissions[ 'Dev Team' ][ 'ns100_move' ] = true;

developer talk

$wgGroupPermissions[ 'Dev Team' ][ 'ns101_read' ] = true;
$wgGroupPermissions[ 'Dev Team' ][ 'ns101_edit' ] = true;
$wgGroupPermissions[ 'Dev Team' ][ 'ns101_create' ] = true;

What I expect to occur is that members of the Dev Team can read, edit, create, and move pages in the developer and dev talk namespaces. The functionality works, but the Special:UserRights page won't let me configure this information -- I can only configure it via direct database manipulation.

When I access that page, the following choices exist for a user:

Groups you can change:

  • Bot
  • Administrator
  • Bureaurcrat
  • Dev Team
  • nsDevRW
  • nsDevRO
  • nsDev_talkRW
  • nsDev_talkRO

First, this looks odd; why are all the "ns" items listed? This did not occur in 1.15. Secondly, the "Dev Team" setting won't save, requiring direct DB access to give rights to users.


Version: 1.15.x
Severity: normal

Details

Reference
bz22732

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:59 PM
bzimport set Reference to bz22732.
bzimport added a subscriber: Unknown Object (MLST).

happy.melon.wiki wrote:

Usergroups should be lowercase and without spaces: replace "Dev Team" with 'devteam' and create [[MediaWiki:Group-devteam]] with the name you want to give it. See if that fixes anything.

tim wrote:

Here's what worked:

  • I changed to "devteam", and now I can save the Special:UserRights page.
  • The permissions work as expected ("Dev" namespace is restricted accordingly.")

Here's what still doesn't work:

  • I added the MediaWiki:Groups-devteam page, but the text "devteam" still shows. Frankly this is zero impact to me, so not problem.
  • On Special:UserRights, I still see these selections (why!?)
    • nsDevRW
    • nsDevRO
    • nsDev_talkRW
    • nsDev_talkRO

Those four selections are really quite confusing to me. (I don't want someone to accidentally select one and cause an error.) From where is this list populated? Is there data in the database somewhere (obvious tables didn't lead me to anything)?

tim wrote:

It looks like those "odd" entries come from the NamespacePermissions extension, but that's odd because I don't remember them from 1.15. I'm quite sure they WEREN'T there.

From http://www.mediawiki.org/wiki/Extension:NamespacePermissions

e.g. nsFoo_talkRW, nsFooRO. These groups are for granting permission to one existing user at a time; the extension causes them to appear on the Special:Userrights page. The extension provides the above pair of groups for each extra namespace you defined in $wgExtraNamespaces.

I commented out these lines from the extension, and everything works fine:

$wgGroupPermissions[ "ns{$title}RW" ][ "ns{$num}_edit" ] = true;
$wgGroupPermissions[ "ns{$title}RW" ][ "ns{$num}_read" ] = true;
$wgGroupPermissions[ "ns{$title}RW" ][ "ns{$num}_create" ] = true;
$wgGroupPermissions[ "ns{$title}RW" ][ "ns{$num}_move" ] = true;
$wgGroupPermissions[ "ns{$title}RO" ][ "ns{$num}_read" ] = true;

I didn't have to do this from 1.15, but whatever... maybe things have changed from my previous wiki (I no longer have access to it because I'm at a different place now, so unfortunately I cannot compare these things).

I guess there are no problems.