I've reworked the user_groups system, again, into something that seems to actually more or less work for now.
* user_groups ur_group is now a short string key ('sysop' etc) * groups table is gone * user_rights table is gone * Permissions for groups are for now set in $wgGroupPermissions. An in-database management system could be re-added in the future if it's really needed, but for now it's mostly just been screwing things up. * Group.php and Special:Groups are deprecated; will probably die. * User group memberships are set explicitly through addGroup and removeGroup methods instead of being re-saved on every change to the user record.
In 1.4, the group keys are in a comma-separated list in the user_rights table (in 1.3 and earlier the user_rights field in the user table). They're now split to individual rows in user_groups; this means you can for instance easily grab a list of all sysops without a nasty LIKE clause.
On an upgrade from 1.4 or older, the user_rights data should be automatically migrated. When updating an existing 1.5 alpha wiki, the previous user_groups table will be renamed and a clean one simply added; due to the various funkadelic problems before I don't think there's much point trying to migrate automatically -- the user_rights fields were overwritten with garbage and I wouldn't trust the contents fo the old user_groups.
So when you update your alpha wiki, be sure to add yourself a sysop back, something like:
INSERT INTO user_groups values (1,'sysop'),(1,'bureaucrat');
The good news is, the sysop user created at installation should actually work now... :D
-- brion vibber (brion @ pobox.com)
On 6/9/05, Brion Vibber brion@pobox.com wrote:
I've reworked the user_groups system, again, into something that seems to actually more or less work for now.
- user_groups ur_group is now a short string key ('sysop' etc)
I think it'd probably be better to get rid of the strings and use levels instead. Level 0 (reader), level 10 (editor), level 20 (page mover), level 30 (can protect pages) level 40 (can block) etc. It's going to be a lot more work to get this to work, but as long as it's getting reworked. Optionally another table could have mappings that are easier to understand: i.e. sysop <= 50, bureaucrat <= 100, etc for backwards compatibility.
Maybe it would be too much for getting this release ready though...
Dori wrote:
On 6/9/05, Brion Vibber brion@pobox.com wrote:
I've reworked the user_groups system, again, into something that seems to actually more or less work for now.
- user_groups ur_group is now a short string key ('sysop' etc)
I think it'd probably be better to get rid of the strings and use levels instead. Level 0 (reader), level 10 (editor), level 20 (page mover), level 30 (can protect pages) level 40 (can block) etc.
While that sounds like it might be simple and convenient at first glance, I think it would be a big step backwards.
For an example off the top of my head, it wouldn't be able to handle things that we use in the default configuration on Wikipedia, such as the bot group. Bots aren't a level between regular accounts and sysops; it's a distinct, disjoint property.
You can build levels on top of groups if you want to, but you can't build groups on top of levels.
-- brion vibber (brion @ pobox.com)
Dori wrote:
I think it'd probably be better to get rid of the strings and use levels instead. Level 0 (reader), level 10 (editor), level 20 (page mover), level 30 (can protect pages) level 40 (can block) etc.
In addition to what Brion already said, I think this is a very bad idea, as it carries a lot of inherent assumptions. The above example carries the assumptions that:
* everyone who can move pages should also be able to edit them * everyone who can protect pages should also be able to move them * everyone who can block users should also be able to protect pages
None of these assumptions necessarily need to be made. Brion's system is way better because it accommodates any combination of privileges, and I don't see why you think it's more complex just because it uses strings.
Timwi
wikitech-l@lists.wikimedia.org