Anomie has uploaded a new change for review.
https://gerrit.wikimedia.org/r/76553
Change subject: Improve default grants
......................................................................
Improve default grants
Sync default grants with [[mw:Auth systems/OAuth/Design/Grants]].
Change-Id: Iff3d5b021034a21ce97aa77510ec39c799c8d636
---
M OAuth.config.php
M frontend/language/MWOAuth.i18n.php
2 files changed, 108 insertions(+), 26 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OAuth
refs/changes/53/76553/1
diff --git a/OAuth.config.php b/OAuth.config.php
index bc8e8aa..8902ec6 100644
--- a/OAuth.config.php
+++ b/OAuth.config.php
@@ -27,29 +27,89 @@
// @TODO: clean up grants
// @TODO: auto-include read/editsemiprotected rights?
-$wgMWOAuthGrantPermissions['editpage']['read'] = true;
+$wgMWOAuthGrantPermissions['useoauth']['autoconfirmed'] = true;
+$wgMWOAuthGrantPermissions['useoauth']['autopatrol'] = true;
+$wgMWOAuthGrantPermissions['useoauth']['autoreview'] = true;
+$wgMWOAuthGrantPermissions['useoauth']['editsemiprotected'] = true;
+$wgMWOAuthGrantPermissions['useoauth']['ipblock-exempt'] = true;
+$wgMWOAuthGrantPermissions['useoauth']['nominornewtalk'] = true;
+$wgMWOAuthGrantPermissions['useoauth']['patrolmarks'] = true;
+$wgMWOAuthGrantPermissions['useoauth']['proxyunbannable'] = true;
+$wgMWOAuthGrantPermissions['useoauth']['purge'] = true;
+$wgMWOAuthGrantPermissions['useoauth']['read'] = true;
+$wgMWOAuthGrantPermissions['useoauth']['skipcaptcha'] = true;
+$wgMWOAuthGrantPermissions['useoauth']['torunblocked'] = true;
+$wgMWOAuthGrantPermissions['useoauth']['unblockself'] = true;
+$wgMWOAuthGrantPermissions['useoauth']['writeapi'] = true;
+
+$wgMWOAuthGrantPermissions['highvolume']['bot'] = true;
+$wgMWOAuthGrantPermissions['highvolume']['apihighlimits'] = true;
+$wgMWOAuthGrantPermissions['highvolume']['noratelimit'] = true;
+$wgMWOAuthGrantPermissions['highvolume']['markbotedits'] = true;
+
$wgMWOAuthGrantPermissions['editpage']['edit'] = true;
$wgMWOAuthGrantPermissions['editpage']['minoredit'] = true;
-$wgMWOAuthGrantPermissions['editpage']['editsemiprotected'] = true;
-$wgMWOAuthGrantPermissions['createeditmovepage']['read'] = true;
+$wgMWOAuthGrantPermissions['editprotected'] =
$wgMWOAuthGrantPermissions['editpage'];
+$wgMWOAuthGrantPermissions['editprotected']['editprotected'] = true;
+
+$wgMWOAuthGrantPermissions['editmycssjs'] =
$wgMWOAuthGrantPermissions['editpage'];
+$wgMWOAuthGrantPermissions['editmycssjs']['editmyusercss'] = true;
+$wgMWOAuthGrantPermissions['editmycssjs']['editmyuserjs'] = true;
+
+$wgMWOAuthGrantPermissions['editinterface'] =
$wgMWOAuthGrantPermissions['editpage'];
+$wgMWOAuthGrantPermissions['editinterface']['editinterface'] = true;
+$wgMWOAuthGrantPermissions['editinterface']['editusercss'] = true;
+$wgMWOAuthGrantPermissions['editinterface']['edituserjs'] = true;
+
+$wgMWOAuthGrantPermissions['createeditmovepage'] =
$wgMWOAuthGrantPermissions['editpage'];
$wgMWOAuthGrantPermissions['createeditmovepage']['createpage'] = true;
$wgMWOAuthGrantPermissions['createeditmovepage']['createtalk'] = true;
-$wgMWOAuthGrantPermissions['createeditmovepage']['edit'] = true;
$wgMWOAuthGrantPermissions['createeditmovepage']['move'] = true;
-$wgMWOAuthGrantPermissions['createeditmovepage']['minoredit'] = true;
-$wgMWOAuthGrantPermissions['createeditmovepage']['editsemiprotected'] = true;
+$wgMWOAuthGrantPermissions['createeditmovepage']['move-rootuserpages'] = true;
+$wgMWOAuthGrantPermissions['createeditmovepage']['move-subpages'] = true;
-$wgMWOAuthGrantPermissions['uploadfile']['read'] = true;
$wgMWOAuthGrantPermissions['uploadfile']['upload'] = true;
$wgMWOAuthGrantPermissions['uploadfile']['reupload-own'] = true;
-$wgMWOAuthGrantPermissions['createeditmovepage']['editsemiprotected'] = true;
-$wgMWOAuthGrantPermissions['uploadeditmovefile']['read'] = true;
-$wgMWOAuthGrantPermissions['uploadeditmovefile']['upload'] = true;
+$wgMWOAuthGrantPermissions['uploadeditmovefile'] =
$wgMWOAuthGrantPermissions['uploadfile'];
$wgMWOAuthGrantPermissions['uploadeditmovefile']['reupload'] = true;
-$wgMWOAuthGrantPermissions['uploadeditmovefile']['move-file'] = true;
-$wgMWOAuthGrantPermissions['createeditmovepage']['editsemiprotected'] = true;
+$wgMWOAuthGrantPermissions['uploadeditmovefile']['reupload-shared'] = true;
+$wgMWOAuthGrantPermissions['uploadeditmovefile']['upload_by_url'] = true;
+$wgMWOAuthGrantPermissions['uploadeditmovefile']['movefile'] = true;
+$wgMWOAuthGrantPermissions['uploadeditmovefile']['suppressredirect'] = true;
+
+$wgMWOAuthGrantPermissions['patrol']['patrol'] = true;
+
+$wgMWOAuthGrantPermissions['rollback']['rollback'] = true;
+
+$wgMWOAuthGrantPermissions['blockusers']['block'] = true;
+$wgMWOAuthGrantPermissions['blockusers']['blockemail'] = true;
+
+$wgMWOAuthGrantPermissions['viewdeleted']['browsearchive'] = true;
+$wgMWOAuthGrantPermissions['viewdeleted']['deletedhistory'] = true;
+$wgMWOAuthGrantPermissions['viewdeleted']['deletedtext'] = true;
+
+$wgMWOAuthGrantPermissions['delete'] = $wgMWOAuthGrantPermissions['editpage'] +
+ $wgMWOAuthGrantPermissions['viewdeleted'];
+$wgMWOAuthGrantPermissions['delete']['delete'] = true;
+$wgMWOAuthGrantPermissions['delete']['bigdelete'] = true;
+$wgMWOAuthGrantPermissions['delete']['deletelogentry'] = true;
+$wgMWOAuthGrantPermissions['delete']['deleterevision'] = true;
+$wgMWOAuthGrantPermissions['delete']['undelete'] = true;
+
+$wgMWOAuthGrantPermissions['protect'] =
$wgMWOAuthGrantPermissions['editprotected'];
+$wgMWOAuthGrantPermissions['protect']['protect'] = true;
+
+$wgMWOAuthGrantPermissions['oversight']['hideuser'] = true;
+$wgMWOAuthGrantPermissions['oversight']['suppressrevision'] = true;
+$wgMWOAuthGrantPermissions['oversight']['suppressionlog'] = true;
+
+$wgMWOAuthGrantPermissions['viewmywatchlist']['viewmywatchlist'] = true;
+
+$wgMWOAuthGrantPermissions['editmywatchlist']['editmywatchlist'] = true;
+
+$wgMWOAuthGrantPermissions['sendemail']['sendemail'] = true;
/** @var integer Seconds after which an idle consumer request is marked as
"expired" */
$wgMWOAuthRequestExpirationAge = 30 * 86400;
diff --git a/frontend/language/MWOAuth.i18n.php
b/frontend/language/MWOAuth.i18n.php
index 340d8c3..4b4591a 100644
--- a/frontend/language/MWOAuth.i18n.php
+++ b/frontend/language/MWOAuth.i18n.php
@@ -202,18 +202,26 @@
'mwoauth-authorize-form-wiki' => 'Wiki: $1',
'mwoauth-grants-heading' => 'Requested permissions: ',
'mwoauth-grants-nogrants' => 'The application has not requested any
permissions.',
- 'mwoauth-grants-editpages' => 'Edit pages',
- 'mwoauth-grants-editmyinterface' => 'Edit your interface (JavaScript
and CSS) pages',
- 'mwoauth-grants-editinterface' => 'Edit MediaWiki\'s interface
(JavaScript and CSS) pages',
- 'mwoauth-grants-movepages' => 'Move pages',
- 'mwoauth-grants-createpages' => 'Create pages',
- 'mwoauth-grants-deletepages' => 'Delete pages',
- 'mwoauth-grants-upload' => 'Upload files',
- 'mwoauth-grant-editpage' => 'Edit existing pages',
+ 'mwoauth-grant-blockusers' => 'Block users',
'mwoauth-grant-createeditmovepage' => 'Create, edit, and move pages',
- 'mwoauth-grant-uploadfile' => 'Upload new files',
+ 'mwoauth-grant-delete' => 'Delete pages, revisions, and log entries',
+ 'mwoauth-grant-editinterface' => 'Edit the MediaWiki namespace and user
CSS/JS',
+ 'mwoauth-grant-editmycssjs' => 'Edit your own user CSS/JS',
+ 'mwoauth-grant-editmywatchlist' => 'Edit your watchlist',
+ 'mwoauth-grant-editpage' => 'Edit existing pages',
+ 'mwoauth-grant-editprotected' => 'Edit protected pages',
+ 'mwoauth-grant-highvolume' => 'High-volume editing',
+ 'mwoauth-grant-oversight' => 'Hide users and suppress revisions',
+ 'mwoauth-grant-patrol' => 'Patrol',
+ 'mwoauth-grant-protect' => 'Protect and unprotect pages',
+ 'mwoauth-grant-rollback' => 'Rollback',
+ 'mwoauth-grant-sendemail' => 'Send email',
'mwoauth-grant-uploadeditmovefile' => 'Upload, replace, and move files',
+ 'mwoauth-grant-uploadfile' => 'Upload new files',
+ 'mwoauth-grant-useoauth' => 'Basic rights',
+ 'mwoauth-grant-viewdeleted' => 'View deleted information',
+ 'mwoauth-grant-viewmywatchlist' => 'View your watchlist',
'mwoauth-callback-not-oob' => 'oauth_callback must be set, and must be
set to "oob" (case-sensitive)',
@@ -424,11 +432,6 @@
'mwoauth-authorize-form-description' => '{{Identical|Application
description}}',
'mwoauth-authorize-form-version' => '{{Identical|Application version}}',
'mwoauth-authorize-form-wiki' => '{{Identical|Wiki}}',
- 'mwoauth-grants-editpages' => '{{Identical|Edit page}}',
- 'mwoauth-grants-movepages' => '{{Identical|Move page}}',
- 'mwoauth-grants-createpages' => '{{Identical|Create page}}',
- 'mwoauth-grants-deletepages' => '{{Identical|Delete page}}',
- 'mwoauth-grants-upload' => '{{Identical|Upload file}}',
'mwoauth-callback-not-oob' => 'Warning that the OAuth developer failed
to include the required "oauth_callback" parameter, which must be set to the
case-sensitive string "oob"',
'right-mwoauthproposeconsumer' =>
'{{doc-right|mwoauthproposeconsumer}}',
'right-mwoauthupdateconsumer' => '{{doc-right|mwoauthupdateconsumer}}',
@@ -444,6 +447,25 @@
'action-mwoauthproposeconsumer' =>
'{{Doc-action|mwoauthproposeconsumer}}',
'action-mwoauthupdateconsumer' =>
'{{Doc-action|mwoauthupdateconsumer}}',
'action-mwoauthviewsuppressed' =>
'{{Doc-action|mwoauthviewsuppressed}}',
+ 'mwoauth-grant-blockusers' => 'Name for OAuth grant "blockusers"',
+ 'mwoauth-grant-createeditmovepage' => 'Name for OAuth grant
"createeditmovepage"',
+ 'mwoauth-grant-delete' => 'Name for OAuth grant "delete"',
+ 'mwoauth-grant-editinterface' => 'Name for OAuth grant "editinterface"',
+ 'mwoauth-grant-editmycssjs' => 'Name for OAuth grant "editmycssjs"',
+ 'mwoauth-grant-editmywatchlist' => 'Name for OAuth grant
"editmywatchlist"',
+ 'mwoauth-grant-editpage' => 'Name for OAuth grant "editpage"',
+ 'mwoauth-grant-editprotected' => 'Name for OAuth grant "editprotected"',
+ 'mwoauth-grant-highvolume' => 'Name for OAuth grant "highvolume"',
+ 'mwoauth-grant-oversight' => 'Name for OAuth grant "oversight"',
+ 'mwoauth-grant-patrol' => 'Name for OAuth grant "patrol"',
+ 'mwoauth-grant-protect' => 'Name for OAuth grant "protect"',
+ 'mwoauth-grant-rollback' => 'Name for OAuth grant "rollback"',
+ 'mwoauth-grant-sendemail' => 'Name for OAuth grant "sendemail"',
+ 'mwoauth-grant-uploadeditmovefile' => 'Name for OAuth grant
"uploadeditmovefile"',
+ 'mwoauth-grant-uploadfile' => 'Name for OAuth grant "uploadfile"',
+ 'mwoauth-grant-useoauth' => 'Name for OAuth grant "useoauth"',
+ 'mwoauth-grant-viewdeleted' => 'Name for OAuth grant "viewdeleted"',
+ 'mwoauth-grant-viewmywatchlist' => 'Name for OAuth grant
"viewmywatchlist"',
);
/** Asturian (asturianu)
--
To view, visit https://gerrit.wikimedia.org/r/76553
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff3d5b021034a21ce97aa77510ec39c799c8d636
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OAuth
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits