From 030e4e827e5a14bac0a9f07bad115ac20440e3d9 Mon Sep 17 00:00:00 2001 From: Scott Koranda Date: Fri, 20 Dec 2024 05:40:54 -0600 Subject: [PATCH 1/2] UnixCluster posixAccount posixGroup LdapProvisioner expunge (CO-2869) --- app/Plugin/LdapProvisioner/Model/CoLdapProvisionerTarget.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Plugin/LdapProvisioner/Model/CoLdapProvisionerTarget.php b/app/Plugin/LdapProvisioner/Model/CoLdapProvisionerTarget.php index 07b764f70..92fc3508f 100644 --- a/app/Plugin/LdapProvisioner/Model/CoLdapProvisionerTarget.php +++ b/app/Plugin/LdapProvisioner/Model/CoLdapProvisionerTarget.php @@ -1545,7 +1545,7 @@ function ($k) use ($attr, $attributes, $modify) { ARRAY_FILTER_USE_KEY)) { // ... and it's not set, so remove the it from the list of objectclasses - $k = array_search($oc, $attributes['objectclass']); + $k = array_search($oc, ($attributes['objectclass'] ?? array())); if($k !== false) { unset($attributes['objectclass'][$k]); From 8cc05c87b0ef3bf42020786dfceceb9c77bacdf6 Mon Sep 17 00:00:00 2001 From: Scott Koranda Date: Wed, 15 Jan 2025 07:11:05 -0600 Subject: [PATCH 2/2] Initialize attributes objectclass LdapProvisioner (CO-2869) --- app/Plugin/LdapProvisioner/Model/CoLdapProvisionerTarget.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Plugin/LdapProvisioner/Model/CoLdapProvisionerTarget.php b/app/Plugin/LdapProvisioner/Model/CoLdapProvisionerTarget.php index 92fc3508f..3cb550675 100644 --- a/app/Plugin/LdapProvisioner/Model/CoLdapProvisionerTarget.php +++ b/app/Plugin/LdapProvisioner/Model/CoLdapProvisionerTarget.php @@ -266,6 +266,7 @@ protected function assembleAttributes($coProvisioningTargetData, // Marshalled attributes ready for export $attributes = array(); + $attributes['objectclass'] = array(); // Full set of supported attributes (not what's configured) $supportedAttributes = $this->supportedAttributes(); @@ -1545,7 +1546,7 @@ function ($k) use ($attr, $attributes, $modify) { ARRAY_FILTER_USE_KEY)) { // ... and it's not set, so remove the it from the list of objectclasses - $k = array_search($oc, ($attributes['objectclass'] ?? array())); + $k = array_search($oc, $attributes['objectclass']); if($k !== false) { unset($attributes['objectclass'][$k]);