Page MenuHomePhabricator

chained autopromote fail
Closed, InvalidPublic

Description

Author: jbreiding

Description:
i am using:
MediaWiki 1.15.0
PHP 5.2.11 (apache2handler)
MySQL 5.0.87
on a rhel LAMP server.

I am hoping someone has tried this before. my users are authenticated and groups retrieved from ldap, i am using autompromote to map those users to local groups from their ldap groups.

here is my autopromote

$wgAutopromote = array(
 "bureaucrat" => array("|",array(APCOND_INGROUPS, "be-hro-dev"), array(APCOND_INGROUPS, "be-pun-dev"), array(APCOND_INGROUPS, "div-rd-1"), array(APCOND_INGROUPS,"quickdesign-writers"), array(APCOND_INGROUPS, "div-rd-2")),
 "reviewer" => array("|",array(APCOND_INGROUPS,"bureaucrat"), array(APCOND_INGROUPS, "sysop")),
 "editor" => array(APCOND_INGROUPS, "sysop")
 );

It seems the first autopromote works but the userlist page does not show the user in the group, neither does the userrights page.

in the page source however i do see,

var wgUserGroups = ["div-rd-1", "*", "user", "bureaucrat"];

only the userlist and userrights page i only see the div-rd-1.

also looking through the autompromote code the iterations through this array do not take into account any groups that may get promoted during the loop, only what was assigned to the user at the time the check was run.

any thoughts or suggestions?


Version: 1.15.x
Severity: major
OS: Linux
Platform: Other

Details

Reference
bz21573

Event Timeline

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

jbreiding wrote:

actually after a little further investigation it seems to only be related to 2 ldap groups, div-rd-1 & div-rd-2, my other groups work just fine. any thoughts?

(In reply to comment #0)

It seems the first autopromote works but the userlist page does not show the
user in the group, neither does the userrights page.

in the page source however i do see,

<pre>
var wgUserGroups = ["div-rd-1", "*", "user", "bureaucrat"];
</pre>

only the userlist and userrights page i only see the div-rd-1.

The thing about $wgAutopromote is that it makes the groups implicit. That is, they will not show up on Special:UserRights or Special:ListUsers. I would've thought that you'd need to add it to $wgImplicitGroups as well, but apparently not? I've not seen an example of trying to use non-implicit groups (like b-crat in your case) with $wgAutopromote. It's probably an edge case that could use some more poking to make sure it all works as expected.

jbreiding wrote:

so the odd thing here is the autopromote actually works for all of the groups in the first map except for the div-rd-* groups.

anyway i can debug this to get more information about what is happening?

sumanah wrote:

Jeremy, can you still reproduce this with MediaWiki 1.17.0?

DannyS712 changed the task status from Open to Stalled.Jul 24 2019, 10:46 PM
DannyS712 updated the task description. (Show Details)
DannyS712 subscribed.

Sumanah's question from 2011 went unanswered, so this may have been resolved already, but can it be reproduced with MediaWiki 1.33.0?

Marking as invalid per lack of response