From c896015a44e4e63d5601e46e1742f352451351a7 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Mon, 13 Jun 2022 14:21:25 -0400 Subject: [PATCH] Allow filtering Special:Log/oath by action Configure "ActionFilteredLogs" in extension.json to allow filtering the oath log by its two actions, verify ("checking" in the UI) and disable-other. == Test plan == * Enable 2FA on your administrator account, use Special:VerifyOATHForUser and Special:VerifyOATHForUser to generate two log entries. * Visit Special:Log/oath and use the new action selector, testing each state to verify the correct set of logs are shown. * Screenshots showing this testing are posted at T310487#7999991. Bug: T310487 Change-Id: I10632c86689e330b21b44a096b098436ebe47e3e --- extension.json | 6 ++++++ i18n/en.json | 3 +++ i18n/qqq.json | 3 +++ 3 files changed, 12 insertions(+) diff --git a/extension.json b/extension.json index 0828fe31..87420f65 100644 --- a/extension.json +++ b/extension.json @@ -192,5 +192,11 @@ "LogRestrictions": { "oath": "oathauth-view-log" }, + "ActionFilteredLogs": { + "oath": { + "verify": [ "verify" ], + "disable-other": [ "disable-other" ] + } + }, "manifest_version": 2 } diff --git a/i18n/en.json b/i18n/en.json index a7553d92..603a9bf5 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -58,6 +58,9 @@ "oath-log-header": "These events track changes to users' two-factor authentication status.", "logentry-oath-disable-other": "$1 {{GENDER:$2|disabled}} the two-factor authentication of $3", "logentry-oath-verify": "$1 {{GENDER:$2|checked}} if $3 had two-factor authentication enabled", + "log-action-filter-oath": "Type of two-factor authentication operation:", + "log-action-filter-oath-verify": "Checking if two-factor authentication is enabled", + "log-action-filter-oath-disable-other": "Disabling two-factor authentication for another user", "oathauth-ui-no-module": "None enabled", "oathauth-module-invalid": "The OATHAuth module that the user has registered is invalid.", "oathauth-module-totp-label": "TOTP (one-time token)", diff --git a/i18n/qqq.json b/i18n/qqq.json index 384da5f2..359b5fa5 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -72,6 +72,9 @@ "oath-log-header": "The Special:Log description that appears on the Special:Log page when you filter logs on this specific log name", "logentry-oath-disable-other": "{{Logentry|Special:Log/oath}}", "logentry-oath-verify": "{{Logentry|Special:Log/oath}}", + "log-action-filter-oath": "{{doc-log-action-filter-type|oath}}\n{{related|Log-action-filter}}", + "log-action-filter-oath-verify": "{{doc-log-action-filter-action|oath|verify}}", + "log-action-filter-oath-disable-other": "{{doc-log-action-filter-action|oath|disable-other}}", "oathauth-ui-no-module": "User preference value when no 2FA module is enabled", "oathauth-module-invalid": "Error message when the OATHAuth module registered by user is invalid", "oathauth-module-totp-label": "User preference value when the TOTP module is enabled",