Last modified: 2014-02-12 23:48:08 UTC
It seems sometimes mw.config.get( 'wgIsPageEditable' ) is set to true on pages that cannot be edited. For example on wikipedia desktop main page I see a view source button but on https://en.m.wikipedia.org/wiki/Main_Page I see an edit button.
It's just: $vars['wgIsPageEditable'] = $user->isAllowed( 'edit' ) && $title->getNamespace() == NS_MAIN It doesn't take protection into account at all, let alone other things (like cascading protection). At the very least, it should use quickUserCan. See bug 43790 and https://gerrit.wikimedia.org/r/#/c/65009/ for discussion of adding a proper version of this to core. It also excludes non-mainspace, but I assume that's intentional (really not "is it editable?", though, but "is mobile ready to edit it?").
Correct. It currently means can mobile edit but yeh looks like quickCanUserEdit is the way to go! Thanks :)
Related URL: https://gerrit.wikimedia.org/r/68483 (Gerrit Change Ic924e810b34276312790a41b5455909737cc2082)
https://gerrit.wikimedia.org/r/68483 (Gerrit Change Ic924e810b34276312790a41b5455909737cc2082) | change APPROVED and MERGED [by jenkins-bot]