Add editing own JSON to editmyoptions grant
authorGergő Tisza <tgr.huwiki@gmail.com>
Tue, 9 Oct 2018 06:46:30 +0000 (23:46 -0700)
committerGergő Tisza <gtisza@wikimedia.org>
Mon, 19 Nov 2018 21:40:57 +0000 (21:40 +0000)
Editing one's own user JS is a dangerous grant that should only
be given to very highly trusted app. The same is probably true
of CSS as well, even if it's less dangerous.
Editing user JSON, on the other hand, is entirely harmless as long
as the consumers of the JSON are coded reasonably, so grouping it
with JS/CSS editing into a single grant is unhelpful. Make it part
of the editmyoptions grant instead.

This extends an existing grant, which is not great, both in terms
of clarity of the grant (even though user preferences and user JSON
have a very similar role, this grouping is not intuitive) and
user experience with existing access tokens (which seem to grant
the new right but actually don't). It still seems better than
further inflating the number of grant options, though.

Bug: T206438
Change-Id: I14482093f7ce05250398feabbb4d17c0461c04c3

includes/DefaultSettings.php
languages/i18n/en.json

index da016d4..e321e30 100644 (file)
@@ -5857,6 +5857,7 @@ $wgGrantPermissions['editmycssjs']['editmyuserjson'] = true;
 $wgGrantPermissions['editmycssjs']['editmyuserjs'] = true;
 
 $wgGrantPermissions['editmyoptions']['editmyoptions'] = true;
+$wgGrantPermissions['editmyoptions']['editmyuserjson'] = true;
 
 $wgGrantPermissions['editinterface'] = $wgGrantPermissions['editpage'];
 $wgGrantPermissions['editinterface']['editinterface'] = true;
index e7691e4..a57373c 100644 (file)
        "grant-delete": "Delete pages, revisions, and log entries",
        "grant-editinterface": "Edit the MediaWiki namespace and sitewide/user JSON",
        "grant-editmycssjs": "Edit your user CSS/JSON/JavaScript",
-       "grant-editmyoptions": "Edit your user preferences",
+       "grant-editmyoptions": "Edit your user preferences and JSON configuration",
        "grant-editmywatchlist": "Edit your watchlist",
        "grant-editsiteconfig": "Edit sitewide and user CSS/JS",
        "grant-editpage": "Edit existing pages",