Last modified: 2014-02-14 10:14:19 UTC
This will make it easier for extensions and gadgets to determine if the current user can edit the current page. Right now, you either have to hack it by looking for an edit tab, or try to figure it out from wgRestrictionEdit and wgUserGroups. But wgRestrictionEdit has weird things like MediaWiki pages being an empty array when logically it should be ["sysop"]), and doesn't take into account important features like cascading protections and TitleBlacklist. I think the right way may be to use Title::userCan.
Definitely useful. Use Title::quickUserCan( 'edit' ) which sets $doExpensiveQueries false to skip "potentially expensive cascading permission checks". Comment says "May provide false positives, but should never provide a false negative", maybe name JS variable wcsUserCanProbablyEdit (* wikipedia client-side, I need to make a separate proposal).
Gerrit at https://gerrit.wikimedia.org/r/65009 . I used the name wgIsProbablyEditable, since I did go with quickUserCan (same as SkinTemplate).
Change 65009 merged by jenkins-bot: Add wgIsProbablyEditable for editability based on quickUserCan. https://gerrit.wikimedia.org/r/65009