From 98c0a697fcf0f693e58d42177730d42d9c37941c Mon Sep 17 00:00:00 2001 From: Rohan Vazarkar Date: Wed, 20 Nov 2024 14:31:49 -0500 Subject: [PATCH] chore: move group collection to end of our ldap queries --- src/CommonLib/LdapProducerQueryGenerator.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/CommonLib/LdapProducerQueryGenerator.cs b/src/CommonLib/LdapProducerQueryGenerator.cs index 1fc7ea73..0d6580f8 100644 --- a/src/CommonLib/LdapProducerQueryGenerator.cs +++ b/src/CommonLib/LdapProducerQueryGenerator.cs @@ -59,11 +59,6 @@ public static GeneratedLdapParameters GenerateDefaultPartitionParameters(Collect }; } - if (methods.HasFlag(CollectionMethod.Group)) { - filter = filter.AddGroups(); - properties.AddRange(CommonProperties.GroupResolutionProps); - } - if (methods.IsComputerCollectionSet()) { filter = filter.AddComputers(); properties.AddRange(CommonProperties.ComputerMethodProps); @@ -89,6 +84,11 @@ public static GeneratedLdapParameters GenerateDefaultPartitionParameters(Collect properties.AddRange(CommonProperties.ComputerMethodProps); } + if (methods.HasFlag(CollectionMethod.Group)) { + filter = filter.AddGroups(); + properties.AddRange(CommonProperties.GroupResolutionProps); + } + return new GeneratedLdapParameters { Filter = filter, Attributes = properties.Distinct().ToArray()