MDL-84274 tool_mfa: Prevent tool_policy pages from redirecting

This commit is contained in:
David Woloszyn
2025-04-24 12:00:03 +10:00
parent ba42149eb1
commit 65a3bf07c4
2 changed files with 16 additions and 0 deletions
+7
View File
@@ -530,6 +530,13 @@ class manager {
}
}
// Site policies from tool_policy.
$policyviewurl = new \moodle_url('/admin/tool/policy/view.php');
$policyindexurl = new \moodle_url('/admin/tool/policy/index.php');
if ($policyviewurl->compare($url, URL_MATCH_BASE) || $policyindexurl->compare($url, URL_MATCH_BASE)) {
return self::NO_REDIRECT;
}
// WS/AJAX check.
if (WS_SERVER || AJAX_SCRIPT) {
if (isset($SESSION->mfa_pending) && !empty($SESSION->mfa_pending)) {