From d6302288237bb65d5d1302368c015512bb5062ac Mon Sep 17 00:00:00 2001 From: Theofilos Intzoglou Date: Wed, 5 Nov 2025 16:13:42 +0200 Subject: [PATCH] Allow installation of the component from the joomla cli --- .../admin/src/Helper/AttachmentsUpdate.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/attachments_component/admin/src/Helper/AttachmentsUpdate.php b/attachments_component/admin/src/Helper/AttachmentsUpdate.php index 83af167d..baf313fc 100644 --- a/attachments_component/admin/src/Helper/AttachmentsUpdate.php +++ b/attachments_component/admin/src/Helper/AttachmentsUpdate.php @@ -45,6 +45,12 @@ class AttachmentsUpdate public static function checkAccess() { $app = Factory::getApplication(); + + // Skip authorization check in CLI context + if ($app->isClient('cli')) { + return; + } + $user = $app->getIdentity(); if ($user === null or !$user->authorise('core.admin', 'com_attachments')) { throw new \Exception(Text::_('JERROR_ALERTNOAUTHOR') . ' (ERR 67)', 404);