From b5824832feb3f91353dd886062760dce752df839 Mon Sep 17 00:00:00 2001 From: JLTRY Date: Mon, 10 Nov 2025 13:12:32 +0100 Subject: [PATCH 1/2] Registry is not the correct class for storing access rights If we set 'core.edit','core.edit.state','core.edit.own' only the core.state value is stored due to hierachical mechanism in Registry If you first set 'core.edit' to true, it becomes $result['core']['edit'] = true. If you then set 'core.edit.state', it becomes $result['core']['edit']['state'] = true, but now $result['core']['edit'] would need to be an array, not a boolean. --- .../admin/src/Helper/AttachmentsPermissions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/attachments_component/admin/src/Helper/AttachmentsPermissions.php b/attachments_component/admin/src/Helper/AttachmentsPermissions.php index 24e0f1a5..4b16ca60 100644 --- a/attachments_component/admin/src/Helper/AttachmentsPermissions.php +++ b/attachments_component/admin/src/Helper/AttachmentsPermissions.php @@ -16,6 +16,7 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; +use Joomla\CMS\Object\CMSObject; use Joomla\CMS\User\UserFactoryInterface; use Joomla\Registry\Registry; @@ -47,7 +48,7 @@ public static function getActions($user_id = null) $user = Factory::getApplication()->getIdentity(); } - $result = new Registry(); + $result = new CMSObject(); $assetName = 'com_attachments'; From 5d6306807fbe216d375a6f7b674733ebf50522da Mon Sep 17 00:00:00 2001 From: JLTRY Date: Mon, 10 Nov 2025 21:07:31 +0100 Subject: [PATCH 2/2] user Registry with an empty separator --- .../admin/src/Helper/AttachmentsPermissions.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/attachments_component/admin/src/Helper/AttachmentsPermissions.php b/attachments_component/admin/src/Helper/AttachmentsPermissions.php index 4b16ca60..ef1d93cc 100644 --- a/attachments_component/admin/src/Helper/AttachmentsPermissions.php +++ b/attachments_component/admin/src/Helper/AttachmentsPermissions.php @@ -16,7 +16,6 @@ use Joomla\CMS\Factory; use Joomla\CMS\Language\Text; -use Joomla\CMS\Object\CMSObject; use Joomla\CMS\User\UserFactoryInterface; use Joomla\Registry\Registry; @@ -48,7 +47,7 @@ public static function getActions($user_id = null) $user = Factory::getApplication()->getIdentity(); } - $result = new CMSObject(); + $result = new Registry(null, ""); $assetName = 'com_attachments';