From 864b2d146bc732d66268cb1ab2cd240840382dd3 Mon Sep 17 00:00:00 2001 From: Thibault Dockx <thibault.dockx@fusiondirectory.org> Date: Thu, 2 Jun 2022 09:56:23 +0100 Subject: [PATCH] :ambulance: Fix(Objects) ACL options errors Fixes ACL checking LDAP options and returning errors. --- include/class_objects.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/class_objects.inc b/include/class_objects.inc index 33732f50c..42358dce9 100644 --- a/include/class_objects.inc +++ b/include/class_objects.inc @@ -90,6 +90,8 @@ class objects $search_attrs = [$attrs]; } foreach ($search_attrs as $search_attr) { + //Below str_replace allows us to remove the options, resulting in proper ACL inspection. (ACLs do not take options). + $search_attr = preg_replace('/;x-.*/', '', $search_attr); $category = $ui->getAttributeCategory($types[0], $search_attr); if ($category === FALSE) { throw new FusionDirectoryException('Could not find ACL for attribute "'.$search_attr.'" for type "'.$types[0].'"'); -- GitLab