I currently manage two public instances of MediaWiki in a scientific community. I can't allow just anybody to create an account or edit pages on either of them, but I don't want to have to do all of the account creation myself. I am sufficiently trusting of my users that I think it reasonable for any registered user to be allowed to create new users, and I can see this as being a fairly common requirement for a semi-open community. To implement this I enclose a simple patch, which I'd like to see folded into the MediaWiki distribution, or something equivalent.
I have basically extended the $wgWhitelistAccount array to include an anonymous option, which now distinguishes a logged in user from someone who is only known by their IP address (currently enabling 'user' in the $wgWhitelistAccount array means anyone can get an account). The code to implement this is in User::isAllowedToCreateAccount()
The default behaviour after adding this patch is the same as before, and most sites that have $wgWhitelistAccount defined in LocalSettings.php file should not need to make any changes unless they wish to take advantage of the new ability to distinguish between anonymous and registered users.
- Andrew
On 8/24/05, Andrew Johnson anj@aps.anl.gov wrote:
I am sufficiently trusting of my users that I think it reasonable for any registered user to be allowed to create new users,
...
I have basically extended the $wgWhitelistAccount array to include an anonymous option, which now distinguishes a logged in user from someone who is only known by their IP address (currently enabling 'user' in the $wgWhitelistAccount array means anyone can get an account). The code to implement this is in User::isAllowedToCreateAccount()
I haven't tested it, but I believe you can do this on a stock 1.5 installation like so: $wgGroupPermissions['user']['createaccount'] = true;
1.5's groups system distinguishes between all users ('*') and logged-in users ('user') as special automatic group assignments, plus whatever is explicitly listed in the user_groups table.
-- brion vibber (brion @ pobox.com)
Hi Andrew. I've given your hack a temporary page on meta so that others who look there for such hacks will find your work:
http://meta.wikimedia.org/wiki/User:Sysy/Andrew_Johnson%27s_account_creation...
If you have an account on meta (or would like to make one), please feel free to move the page.
Sy,
mediawiki-l@lists.wikimedia.org