From dd93de3f913bf80e21321d8d3c8efd44c0ebb7c0 Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Thu, 2 Feb 2023 14:19:53 -0500 Subject: [PATCH] Add getAccessTemplate() method to RepeaterPage class to fix issue where some repeater permissions did not always inherit from the page that owns it, resulting in a case where files in repeater using 'secureFiles' option could be blocked when they should have been available. --- wire/modules/Fieldtype/FieldtypeRepeater/RepeaterPage.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wire/modules/Fieldtype/FieldtypeRepeater/RepeaterPage.php b/wire/modules/Fieldtype/FieldtypeRepeater/RepeaterPage.php index aacbb397..ed94e64b 100644 --- a/wire/modules/Fieldtype/FieldtypeRepeater/RepeaterPage.php +++ b/wire/modules/Fieldtype/FieldtypeRepeater/RepeaterPage.php @@ -278,5 +278,10 @@ class RepeaterPage extends Page { return $this; } */ + + public function getAccessTemplate($type = 'view') { + $p = $this->getForPageRoot(); + return $p->id ? $p->getAccessTemplate($type) : parent::getAccessTemplate($type); + } }