https://bugzilla.wikimedia.org/show_bug.cgi?id=47480

--- Comment #18 from Patrick Westerhoff <[email protected]> ---
Okay, maybe this is not as simple as I would it like to be. The AJAX'ifying
happens in mediawiki.page.watch.ajax.js[1]. As we don’t want to serve different
JS modules based on the user rights, we would have to add some kind of switch
to the module that won’t execute the function then.

We *could* use the mediaWiki.user module[2] to get the rights of the current
user, but that would involve another API call, so that’s not a good idea.

We could also either add some switch class to the body tag which the ajax
module filters for, or define another config variable that indicates if the
write API is available right now or not. But I’m not sure what the official
stance on adding such things is for MediaWiki.

And then another option would be to add a "noapi" class to all the generated
watch links which then again could be filtered for.


What do you think? What would be an acceptable solution?


[1]
https://git.wikimedia.org/blob/mediawiki%2Fcore/HEAD/resources%2Fmediawiki.page%2Fmediawiki.page.watch.ajax.js#L103
[2] http://www.mediawiki.org/wiki/ResourceLoader/Default_modules#mediaWiki.user

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to