Mainframe98 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/373851 )

Change subject: Extend the extension registry with wgRestrictionLevels
......................................................................

Extend the extension registry with wgRestrictionLevels

This way extensions can easily extend the available
protection levels without having to resort to using
the callback.

I noted one difference compared to the callback:
The order of appearance of the protection levels is
swapped, if the added protection level was previously
last in the list, it will now be the first.
Changing the merge strategy did not make a
difference.

Bug: T174056
Change-Id: Ie75d8de750cd21990a86a06c400bd624f65ea038
---
M docs/extension.schema.v1.json
M docs/extension.schema.v2.json
M includes/registration/ExtensionProcessor.php
3 files changed, 15 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/51/373851/1

diff --git a/docs/extension.schema.v1.json b/docs/extension.schema.v1.json
index 7cfebca..a65a11a 100644
--- a/docs/extension.schema.v1.json
+++ b/docs/extension.schema.v1.json
@@ -521,6 +521,13 @@
                                "type": "string"
                        }
                },
+               "RestrictionLevels": {
+                       "type": "array",
+                       "description": "Additional protection levels added by 
the extension",
+                       "items": {
+                               "type": "string"
+                       }
+               },
                "ContentHandlers": {
                        "type": "object",
                        "description": "Mapping of model ID to class name",
diff --git a/docs/extension.schema.v2.json b/docs/extension.schema.v2.json
index 75a4f2c..268a1f3 100644
--- a/docs/extension.schema.v2.json
+++ b/docs/extension.schema.v2.json
@@ -542,6 +542,13 @@
                                "type": "string"
                        }
                },
+               "RestrictionLevels": {
+                       "type": "array",
+                       "description": "Additional protection levels available 
added by the extension",
+                       "items": {
+                               "type": "string"
+                       }
+               },
                "ContentHandlers": {
                        "type": "object",
                        "description": "Mapping of model ID to class name",
diff --git a/includes/registration/ExtensionProcessor.php 
b/includes/registration/ExtensionProcessor.php
index ce262bd..b3cb737 100644
--- a/includes/registration/ExtensionProcessor.php
+++ b/includes/registration/ExtensionProcessor.php
@@ -50,6 +50,7 @@
                'RemoveGroups',
                'ResourceLoaderLESSVars',
                'ResourceLoaderSources',
+               'RestrictionLevels',
                'RevokePermissions',
                'SessionProviders',
                'SpecialPages',

-- 
To view, visit https://gerrit.wikimedia.org/r/373851
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie75d8de750cd21990a86a06c400bd624f65ea038
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mainframe98 <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to