Reputation: 32281
I am trying to autopromote users to the "superuser" group on login, but it is not working
LocalSettings.php
// Super user group
$wgAddGroups['superuser'] = true;
$wgGroupPermissions['superuser']['read'] = true;
$wgGroupPermissions['superuser']['edit'] = true;
Login plugin
$wgAutopromote = array('superuser');
Upvotes: 0
Views: 560
Reputation: 32281
Auto promote is deceptive and does not work in my experience. I ended up having to add the user to the group in my auth plugin extension. I believe I used the add group method from the User object, I'll have to double-check that.
Upvotes: 0
Reputation: 1938
You want all logged in users to have "superuser" privileges? Simplest approach would be to add additional user rights to the existing user
user group, rather than creating a new user group.
$wgGroupPermissions['user']['some_user_right'] = true;
See http://www.mediawiki.org/wiki/Manual:User_rights.
Upvotes: 1
Reputation: 10489
According to the MediaWiki manual on $wgAutopromote, $wgAutopromote is an associative array.
You could try one of the following:
$wgAutopromote = array('superuser' => array( APCOND_EDITCOUNT, 0 ));
Or
$wgAutopromote = array(
'superuser' => array( '&',
array( APCOND_EDITCOUNT, 0 ),
),
);
I don't have a live copy of MediaWiki with me right now, so I don't know which one is going to work, though I have a hunch that the second will likely work.
Upvotes: 0