From: Reedy Date: Mon, 31 Oct 2016 17:12:56 +0000 (+0000) Subject: registration: Support setting $wgPasswordPolicy in extension.json X-Git-Tag: 1.31.0-rc.0~4828 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=34e549ff61b4dfb34a62bc344af5ddb1d5462f5a registration: Support setting $wgPasswordPolicy in extension.json Bug: T149597 Change-Id: I56c0b8932fcd42ec9b748529daa32a998fb19bf8 --- diff --git a/docs/extension.schema.json b/docs/extension.schema.json index 2cf5fe11b1..38b5dea02f 100644 --- a/docs/extension.schema.json +++ b/docs/extension.schema.json @@ -646,6 +646,10 @@ "SkinOOUIThemes": { "type": "object" }, + "PasswordPolicy": { + "type": "object", + "description": "Password policies" + }, "callback": { "type": [ "array", diff --git a/docs/extension.schema.v1.json b/docs/extension.schema.v1.json index 8659dffa38..f7c0a2b4eb 100644 --- a/docs/extension.schema.v1.json +++ b/docs/extension.schema.v1.json @@ -636,6 +636,10 @@ "SkinOOUIThemes": { "type": "object" }, + "PasswordPolicy": { + "type": "object", + "description": "Password policies" + }, "callback": { "type": [ "array", diff --git a/includes/registration/ExtensionProcessor.php b/includes/registration/ExtensionProcessor.php index 26fbfa1d17..8fa71be855 100644 --- a/includes/registration/ExtensionProcessor.php +++ b/includes/registration/ExtensionProcessor.php @@ -42,6 +42,7 @@ class ExtensionProcessor implements Processor { 'LogRestrictions', 'LogTypes', 'MediaHandlers', + 'PasswordPolicy', 'RateLimits', 'RecentChangesFlags', 'RemoveCredentialsBlacklist', @@ -72,6 +73,7 @@ class ExtensionProcessor implements Processor { 'wgNamespaceContentModels' => 'array_plus', 'wgNamespaceProtection' => 'array_plus', 'wgNamespacesWithSubpages' => 'array_plus', + 'wgPasswordPolicy' => 'array_merge_recursive', 'wgRateLimits' => 'array_plus_2d', 'wgRevokePermissions' => 'array_plus_2d', ];