On Feb 7, 2008 1:45 PM, tlaqua@svn.wikimedia.org wrote:
- Disallowing deleting user_id 1 (WikiSysop/Admin/whatever)
MediaWiki doesn't have any concept of a root user, and it seems like a bad idea to try to enforce such an idea in an extension. User 1 is just the one who set up the wiki, who might or might not be any kind of special authority. On the English Wikipedia, user #1 is [[User:Damian Yerrick]], who's not even a sysop. That's probably due to import issues, but for another example, user #1 on kshwiki (Kölsch-language Wikipedia) is [[ksh:User:Deprifry]], who has two edits made in 2006 and is also not even a sysop.
Of course Wikimedia is odd in a lot of ways, but as far as third parties go, it's certain that quite a few wikis are set up by contractors or other people who aren't necessarily going to participate in the wiki at all. Or even if they're some important person at first, they might eventually resign or be ousted. It's weird and potentially annoying to add this restriction arbitrarily. It protects someone who might not need protection, and doesn't protect many other people whom you might want to protect.
If you're going to do any kind of restriction like this, IMO, make it a config option, like $wgUnmergeableUsers. I guess you could initialize it to array( 1 ), but I'd still leave it empty by default, personally.
Done. Though, that also brings in to question my assumptions in forcing a merge to ID 1 if no 'new user' is provided...
Any thoughts on where I should assign references to the old user to if they're just trying to 'delete' a user? Anonymous (ID 0) maybe, but then what would be appropriate for 'text' fields - doesn't that need to fit the form of an IP? Or I suppose I could just *require* they figure out where they want to assign the old references and stop making that 'user_id 1' assumption.
-tl
-----Original Message----- From: wikitech-l-bounces@lists.wikimedia.org [mailto:wikitech-l- bounces@lists.wikimedia.org] On Behalf Of Simetrical Sent: Thursday, February 07, 2008 8:24 PM To: wikitech-l@lists.wikimedia.org Subject: Re: [Wikitech-l] [MediaWiki-CVS] SVN: [30678]trunk/extensions/UserMerge/UserMerge_body.php
On Feb 7, 2008 1:45 PM, tlaqua@svn.wikimedia.org wrote:
- Disallowing deleting user_id 1 (WikiSysop/Admin/whatever)
MediaWiki doesn't have any concept of a root user, and it seems like a bad idea to try to enforce such an idea in an extension. User 1 is just the one who set up the wiki, who might or might not be any kind of special authority. On the English Wikipedia, user #1 is [[User:Damian Yerrick]], who's not even a sysop. That's probably due to import issues, but for another example, user #1 on kshwiki (Kölsch-language Wikipedia) is [[ksh:User:Deprifry]], who has two edits made in 2006 and is also not even a sysop.
Of course Wikimedia is odd in a lot of ways, but as far as third parties go, it's certain that quite a few wikis are set up by contractors or other people who aren't necessarily going to participate in the wiki at all. Or even if they're some important person at first, they might eventually resign or be ousted. It's weird and potentially annoying to add this restriction arbitrarily. It protects someone who might not need protection, and doesn't protect many other people whom you might want to protect.
If you're going to do any kind of restriction like this, IMO, make it a config option, like $wgUnmergeableUsers. I guess you could initialize it to array( 1 ), but I'd still leave it empty by default, personally. _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Tim Laqua wrote:
Done. Though, that also brings in to question my assumptions in forcing a merge to ID 1 if no 'new user' is provided...
Any thoughts on where I should assign references to the old user to if they're just trying to 'delete' a user? Anonymous (ID 0) maybe, but then what would be appropriate for 'text' fields - doesn't that need to fit the form of an IP? Or I suppose I could just *require* they figure out where they want to assign the old references and stop making that 'user_id 1' assumption.
ID = 0 does not necessarily imply that the username must be an IP address; the most obvious example is [[User:MediaWiki default]]. That said, such usernames should be added to the $wgReservedUsernames array, to stop anyone from registering them later.
On Feb 7, 2008 10:59 PM, Tim Laqua t.laqua@gmail.com wrote:
Any thoughts on where I should assign references to the old user to if they're just trying to 'delete' a user? Anonymous (ID 0) maybe, but then what would be appropriate for 'text' fields - doesn't that need to fit the form of an IP? Or I suppose I could just *require* they figure out where they want to assign the old references and stop making that 'user_id 1' assumption.
Why don't you just rename the first deleted account to "Deleted user" or whatever, and then merge all subsequent deletions there? If there's no real user id associated with the new account, you can't (for instance) do anything sensible with log entries.
If you do this, I would suggest you not hardcode the name (even localizably), because that could cause problems with existing users' names -- especially if it's localizable, and updates may add new localizations. (There is a User:Deleted on enwiki, and a User:Deleted User 12, but no User:Deleted user yet. :) ) Instead, when the first deletion occurs, ask for a name to be entered, prefilling with some nice wfMsgForContent()ed string. Then check if the submitted username is already in use. If not, rename to that account and record the fact somewhere, so you don't have to ask in the future. If it is in use, refuse to do it, or ask for confirmation.
Simetrical wrote:
On Feb 7, 2008 1:45 PM, tlaqua@svn.wikimedia.org wrote:
- Disallowing deleting user_id 1 (WikiSysop/Admin/whatever)
MediaWiki doesn't have any concept of a root user, and it seems like a bad idea to try to enforce such an idea in an extension. User 1 is just the one who set up the wiki, who might or might not be any kind of special authority.
Further, if the DB's been wiped and rebuilt a few times, there may well not be a user number 1.
No assumptions whatsoever can be made about the meaning or presence of any user IDs, except that a recorded ID of 0 in another table indicates a non-account (IPs, pre-conversion users, special maintenance tasks, etc)
-- brion
wikitech-l@lists.wikimedia.org