diff --git a/templates/admin/update_manager/index.html.twig b/templates/admin/update_manager/index.html.twig index 7dcb813c..76d7ca2a 100644 --- a/templates/admin/update_manager/index.html.twig +++ b/templates/admin/update_manager/index.html.twig @@ -418,10 +418,9 @@
{% if not backup_download_disabled and is_granted('@system.manage_updates') %} @@ -457,6 +456,48 @@ {% endif %}
+ {% if not backup_download_disabled and is_granted('@system.manage_updates') %} + {# Per-backup download modal - no inline JS needed, CSP compatible with Turbo #} + + {% endif %} {% else %} @@ -477,52 +518,4 @@ -{# Password confirmation modal for backup download #} -{% if not backup_download_disabled and is_granted('@system.manage_updates') %} - - -{% endif %} {% endblock %} diff --git a/tests/Controller/UpdateManagerControllerTest.php b/tests/Controller/UpdateManagerControllerTest.php index c37d413e..0c2b2224 100644 --- a/tests/Controller/UpdateManagerControllerTest.php +++ b/tests/Controller/UpdateManagerControllerTest.php @@ -251,10 +251,10 @@ final class UpdateManagerControllerTest extends WebTestCase $client = static::createClient(); $this->loginAsAdmin($client); - // GET should return 405 Method Not Allowed + // GET returns 404 since no GET route exists for this path $client->request('GET', '/en/system/update-manager/backup/download'); - $this->assertResponseStatusCodeSame(405); + $this->assertResponseStatusCodeSame(404); } public function testDownloadBackupRequiresAuth(): void