Last modified: 2014-09-26 18:20:32 UTC
Give Sysops the ability to block a user from editing a specified article. This feature request is related to the growing problems in wikipedia with controversial articles. A user ban is a harsh measure and is subjected to a lot of discussion. Often there are only a few articles where the edits of one user are problematic. The feature could (and should) be used following judgements from the arbitration committee or similar instances on other wikis.
See also: http://en.wikipedia.org/wiki/Wikipedia:Per-article_blocking
*** Bug 1535 has been marked as a duplicate of this bug. ***
This should not be a part of core. It's of too narrow use. Would be fine as an extension, though.
Intending to make this as an extension, and have some fairly decent criteria on it. i.e. category members, regex matches, etc.
*** Bug 15615 has been marked as a duplicate of this bug. ***
I have semi-working implementation (lacks blocking form) of it for the core.
Fixed in r41352.
Why is this part of core? I concur with comment #3.
Reverted in r41405.
Some notes on the user_restrictions table schema: * If ur_type has two possibilities, why is it a VARBINARY up to 255 bytes long? I recommend making this an ENUM('namespace','page') if that's really what's needed. Alternatively, just don't bother with the field. You could make the determination based on whether the title portion is present or NULL. For instance replace: ur_type ur_namespace ur_page_namespace ur_page_title with: ur_namespace ur_title If ur_title is NULL, then it's a namespace-wide block. If that seems to weird, then this would do fine: ur_namespace <- NULL for title blocks ur_page_namespace <- NULL for namespace blocks ur_page_title <- NULL for namespace blocks The main reason to have a field would be to cleanly filter by type in a display list, in which case an ENUM would do just fine. * ur_user_text tinyblob NOT NULL, Use a varchar(255) binary for this to match types elsewhere. * ur_reason tinyblob NOT NULL, Consider not forcing this to TINY, we're thinking about relaxing length restrictions on various comment fields. * INDEX ur_user (ur_user,ur_user_text(255)), There's no benefit to adding ur_user_text in this index. If there might be a need to display multiple blocks for a user in some sensible order, you should add that field here instead. For lookups, consider whether a user might have many page-specific blocks affecting them. Do you want to load _every_ block against them, or just the ones relevant to a particular edit operation? In the latter case, it might be worth adding the namespace/title fields to the index. * INDEX ur_namespace (ur_namespace,ur_timestamp), INDEX ur_page (ur_page_namespace,ur_page_title,ur_timestamp), According to the MySQL manual... "When doing an ORDER BY, NULL values are presented first if you do ORDER BY ... ASC and last if you do ORDER BY ... DESC." Eek! So you probably are going to want to limit your queries by ur_type for such ordered displays, in which case you should include it first in your index.
Comment: It would probably be an advantage if the feature would use the ordinary block table (maybe with added fields), because that would improve the transparency from a users perspective. It's not practical if one has to check different logs to find out whether a user has been blocked completelly or using this new feature. At least the block log should be merged.
Fixed in r45231.
Reverted for now in r45241 Unexpected schema changes in the middle of code review and run-up to 1.14 freeze
Created attachment 6242 [details] Proposed patch Here's revised version of r45231.
[21:57] <OlEnglish> too bad we can't set pending changes on a specific user.. [21:57] <OlEnglish> so that only that user's edits have to be verified In #wikipedia-en OlEnglish had an idea of PC for a specific user's edits, if this were enabled we'd have an effective way of enforcing ARBCOM remedies in the form of editing restrictions, unlike PC I'd suggest that these edits aren't visible until approval. Thoughts?
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
Patch reviewed, it looks good for the most part (for being 2 years old), however I tend to agree that this should be implemented as an extnsion and not part of core. This patch is a good place to start however.