Skip to content

Commit ab326e2

Browse files
committed
Use containsAll when removing group memberships
1 parent 6c3d90f commit ab326e2

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/integration/ad-group-sync/main/classes/AdGroupSyncService.cls

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ public without sharing class AdGroupSyncService {
125125
salesforceGroupId
126126
);
127127
if (
128-
!adGroupIds.contains(adGroup.adGroupId) &&
128+
!new Set<String>(adGroupIds)
129+
.containsAll(adGroup.adGroupId.split(',')) &&
129130
usersSalesforceMembership.contains(salesforceGroupId)
130131
) {
131132
groupMemberIdsToRemove.add(salesforceGroupId);

src/platform-data-model/ad-group-mapping-custom-metadata/customMetadata/AdGroupMapping.NKS_Fortrolig_Skjermet.md-meta.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66
<field>AccessType__c</field>
77
<value xsi:nil="true" />
88
</values>
9-
<values>
9+
<values>
1010
<field>AdGroupIdPreprod__c</field>
11-
<value xsi:type="xsd:string">cd0a9215-9673-48ca-84a1-6a6ef349811a,ea930b6b-9397-44d9-b9e6-f4cf527a632a</value>
11+
<value xsi:type="xsd:string">
12+
dbe4ad45-320b-4e9a-aaa1-73cca4ee124d,ea930b6b-9397-44d9-b9e6-f4cf527a632a</value>
1213
</values>
1314
<values>
1415
<field>AdGroupIdProd__c</field>
15-
<value xsi:type="xsd:string">e66658dc-1027-4d86-b8ee-687bd8740313,9ec6487d-f37a-4aad-a027-cd221c1ac32b</value>
16+
<value xsi:type="xsd:string">
17+
e750ceb5-b70b-4d94-b4fa-9d22467b786b,9ec6487d-f37a-4aad-a027-cd221c1ac32b</value>
1618
</values>
1719
<values>
1820
<field>PermissionSetGroup__c</field>

0 commit comments

Comments
 (0)