Page MenuHomePhabricator

Kill the "View source" tab: refactor page protection out of Core
Open, NormalPublic

Description

(bug titled in honor of a talk by Benjamin Mako Hill, 2012-09-13)

I've discovered that the builtin page protection is nicely configurable, but very difficult to extend. Specifically, I attempted to implement a gated-trunk model which allows anyone to edit a protected page, but to do so the builtin protection mechanism would have to be effectively disabled.

Rewriting the builtin protection in any significant way is an enormous and expensive task (this patch removes almost 5,000 lines of code), and errors could result in damaged reputation or even lawsuits. I decided that the code would be much more easily managed as an extension, and can even be replaced by an entirely different system.

The initial goal you see reflected in these patches is simply to refactor the code in a way that preserves exactly the same functionality, while also keeping code structure intact whenever possible, to facilitate review.

See [[Extension:ProtectedTitles]] for more information.

Patches:

https://gerrit.wikimedia.org/r/23999 ( Remove protection from mediawiki core )

https://github.com/adamwight/wmf-ext-protection ( so-called Extension:ProtectedTitles )


Version: unspecified
Severity: enhancement
URL: https://www.mediawiki.org/wiki/Requests_for_comment/Page_protection_as_a_component

Details

Reference
bz40293

Event Timeline

bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz40293.
bzimport added a subscriber: Unknown Object (MLST).
awight created this task.Sep 17 2012, 6:37 AM

(In reply to comment #0)

(bug titled in honor of a talk by Benjamin Mako Hill, 2012-09-13)

:-)

I've discovered that the builtin page protection is nicely configurable, but
very difficult to extend. Specifically, I attempted to implement a gated-trunk
model which allows anyone to edit a protected page, but to do so the builtin
protection mechanism would have to be effectively disabled.

Right. You could presumably use something like [[mw:Extension:FlaggedRevs]] for this, though I'm not sure anyone ever actually has.

Rewriting the builtin protection in any significant way is an enormous and
expensive task (this patch removes almost 5,000 lines of code), and errors
could result in damaged reputation or even lawsuits. I decided that the code
would be much more easily managed as an extension, and can even be replaced by
an entirely different system.

The fundamental question here seems to be whether MediaWiki should ship with the ability to protect pages. I believe the answer is yes. I would consider page protection to be a basic and expected feature; I would not consider page protection to be a feature that requires an add-on (i.e., an extension).

The initial goal you see reflected in these patches is simply to refactor the
code in a way that preserves exactly the same functionality, while also keeping
code structure intact whenever possible, to facilitate review.

See [[Extension:ProtectedTitles]] for more information.

You want [[mw:Extension:ProtectedTitles]].

I know Siebrand suggested that you file a bug (and it's great that you have), but what you really want is an RFC: https://www.mediawiki.org/wiki/Requests_for_comment. Bugzilla is a good place to track technical issues; it's not a good place for drafting your thoughts and making a passionate case for why we should kill page protection in MediaWiki core. An RFC, on the other hand, is a perfect venue for this. :-)

MZMcBride: thank you for helping hone my argument ;)

I'll follow up at the RFC page, but to answer the fundamental question, MediaWiki already ships with some really critical functionality packaged as extensions, Vector and ParserFunctions for example. I believe this was for the same reason as I proposed extracting the protection code: now we can experiment with the next default skin and provide a trivial upgrade path when it's ready for mainstreaming.

ParserFunctions is something some people don't want on their wiki. No one has suggested that MediaWiki should not have page protection. The Vector extension is not the skin, it's a collection of enhancements. And there are open bugs that consider the fact that it's not inside core as bug that needs to be fixed.

So I wouldn't cling to them as arguments that protection should be pulled out of core.

(In reply to comment #0)

https://gerrit.wikimedia.org/r/23999 (Remove protection from mediawiki core)

Patch abandoned.

jayvdb added a subscriber: jayvdb.Feb 20 2015, 3:04 AM