Last modified: 2013-07-25 09:01:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T42293, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40293 - Kill the "View source" tab: refactor page protection out of Core
Kill the "View source" tab: refactor page protection out of Core
Status: PATCH_TO_REVIEW
Product: MediaWiki
Classification: Unclassified
Page protection (Other open bugs)
unspecified
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
https://www.mediawiki.org/wiki/Reques...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-17 06:37 UTC by Adam Wight
Modified: 2013-07-25 09:01 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Adam Wight 2012-09-17 06:37:16 UTC
(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 )
Comment 1 MZMcBride 2012-09-17 23:54:39 UTC
(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. :-)
Comment 2 Adam Wight 2012-09-18 00:10:01 UTC
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.
Comment 3 Daniel Friesen 2012-09-18 10:28:04 UTC
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.
Comment 5 Andre Klapper 2013-07-25 08:18:29 UTC
(In reply to comment #0)
> https://gerrit.wikimedia.org/r/23999 (Remove protection from mediawiki core)

Patch abandoned.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links