Store 'canEdit' property when auto-saving or switching editors

Added in b9835f75d3.

Bug: T224319
Change-Id: I05d6aa500ba921d114f33972369ad4dd53b8e140
This commit is contained in:
Bartosz Dziewoński 2019-05-24 23:08:17 +02:00
parent 4a7231f3ee
commit fbb56d66fa
2 changed files with 4 additions and 0 deletions

View file

@ -570,6 +570,7 @@ ve.init.mw.ArticleTarget.prototype.storeDocState = function ( html ) {
basetimestamp: this.baseTimeStamp, basetimestamp: this.baseTimeStamp,
starttimestamp: this.startTimeStamp, starttimestamp: this.startTimeStamp,
oldid: this.revid, oldid: this.revid,
canEdit: this.canEdit,
checkboxesDef: this.checkboxesDef, checkboxesDef: this.checkboxesDef,
checkboxesMessages: this.checkboxesMessages checkboxesMessages: this.checkboxesMessages
} }
@ -2328,6 +2329,7 @@ ve.init.mw.ArticleTarget.prototype.getWikitextDataPromiseForDoc = function ( mod
data.basetimestamp = target.baseTimeStamp; data.basetimestamp = target.baseTimeStamp;
data.starttimestamp = target.startTimeStamp; data.starttimestamp = target.startTimeStamp;
data.oldid = target.revid; data.oldid = target.revid;
data.canEdit = target.canEdit;
data.checkboxesDef = target.checkboxesDef; data.checkboxesDef = target.checkboxesDef;
return response; return response;
} ); } );

View file

@ -54,6 +54,8 @@ QUnit.test( 'init', function ( assert ) {
basetimestamp: '20161119005107', basetimestamp: '20161119005107',
starttimestamp: '20180831122319', starttimestamp: '20180831122319',
oldid: 1804, oldid: 1804,
blockinfo: null,
canEdit: true,
content: '<!DOCTYPE html>\n' + content: '<!DOCTYPE html>\n' +
'<html prefix="dc: http://purl.org/dc/terms/ mw: http://mediawiki.org/rdf/" about="http://localhost/MediaWiki/core/index.php/Special:Redirect/revision/1804">' + '<html prefix="dc: http://purl.org/dc/terms/ mw: http://mediawiki.org/rdf/" about="http://localhost/MediaWiki/core/index.php/Special:Redirect/revision/1804">' +
'<head prefix="mwr: http://localhost/MediaWiki/core/index.php/Special:Redirect/"><meta property="mw:TimeUuid" content="a4fc0409-ad18-11e8-9b45-dd8cefbedb6d"/>' + '<head prefix="mwr: http://localhost/MediaWiki/core/index.php/Special:Redirect/"><meta property="mw:TimeUuid" content="a4fc0409-ad18-11e8-9b45-dd8cefbedb6d"/>' +