diff --git a/admin/tool/policy/classes/output/page_agreedocs.php b/admin/tool/policy/classes/output/page_agreedocs.php index 82201c6d845..5ede1610a2b 100644 --- a/admin/tool/policy/classes/output/page_agreedocs.php +++ b/admin/tool/policy/classes/output/page_agreedocs.php @@ -278,9 +278,7 @@ class page_agreedocs implements renderable, templatable { // and $SESSION->wantsurl is defined, redirect to the return page. $hasagreedsignupuser = empty($USER->id) && $this->signupuserpolicyagreed; $hasagreedloggeduser = $USER->id == $userid && !empty($USER->policyagreed); - $canrevoke = api::can_revoke_policies($USER->id); - if (!is_siteadmin() && ($hasagreedsignupuser || - ($hasagreedloggeduser && !$canrevoke))) { + if (!is_siteadmin() && ($hasagreedsignupuser || $hasagreedloggeduser)) { $this->redirect_to_previous_url(); } diff --git a/admin/tool/policy/tests/behat/acceptances.feature b/admin/tool/policy/tests/behat/acceptances.feature index 02588bd82c3..b8c6d6e8066 100644 --- a/admin/tool/policy/tests/behat/acceptances.feature +++ b/admin/tool/policy/tests/behat/acceptances.feature @@ -80,6 +80,7 @@ Feature: Viewing acceptances reports and accepting on behalf of other users And I press "Next" And I set the field "I agree to the This site policy" to "1" And I press "Next" + And I should not see "Next" And I navigate to "Users > Privacy and policies > Manage policies" in site administration And I click on "1 of 4 (25%)" "link" in the "This site policy" "table_row" And I click on "Consent not given" "link" in the "User One" "table_row"