aboutsummaryrefslogtreecommitdiff
path: root/src/ext/Util/wixext/UtilDecompiler.cs
diff options
context:
space:
mode:
authorBevan Weiss <bevan.weiss@gmail.com>2024-07-06 21:03:57 +1000
committerRob Mensching <rob@firegiant.com>2025-02-11 23:14:49 -0800
commit644276562dcadd65fcb0e9a7c06c704cdda36423 (patch)
treef42af115bf5354d1c1691c44d517388f6c369b16 /src/ext/Util/wixext/UtilDecompiler.cs
parent7b1bb025dea1d1e9e144cce0dcbba2d86f053b8f (diff)
downloadwix-644276562dcadd65fcb0e9a7c06c704cdda36423.tar.gz
wix-644276562dcadd65fcb0e9a7c06c704cdda36423.tar.bz2
wix-644276562dcadd65fcb0e9a7c06c704cdda36423.zip
Group Add/Remove working.
Local group membership Add/Remove working, however with BUILTIN local system groups .NET doesn't appear to locate them as either groups nor basic security Principals. Still needs work to fix the test for nested groups. Ideally with some way to test for domain groups. Signed-off-by: Bevan Weiss <bevan.weiss@gmail.com>
Diffstat (limited to 'src/ext/Util/wixext/UtilDecompiler.cs')
-rw-r--r--src/ext/Util/wixext/UtilDecompiler.cs18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/ext/Util/wixext/UtilDecompiler.cs b/src/ext/Util/wixext/UtilDecompiler.cs
index 53b75b8d..a236ece9 100644
--- a/src/ext/Util/wixext/UtilDecompiler.cs
+++ b/src/ext/Util/wixext/UtilDecompiler.cs
@@ -478,14 +478,26 @@ namespace WixToolset.Util
478 { 478 {
479 foreach (var row in table.Rows) 479 foreach (var row in table.Rows)
480 { 480 {
481 var parentId = row.FieldAsString(0);
482 var parentExists = this.DecompilerHelper.TryGetIndexedElement("Group", parentId, out var parentGroup);
483
481 var childId = row.FieldAsString(1); 484 var childId = row.FieldAsString(1);
482 if (this.DecompilerHelper.TryGetIndexedElement("Group", childId, out var group)) 485 var childExists = this.DecompilerHelper.TryGetIndexedElement("Group", childId, out var childGroup);
486
487 if (parentExists && childExists)
483 { 488 {
484 group.Add(new XElement(UtilConstants.GroupRefName, new XAttribute("Id", row.FieldAsString(0)))); 489 childGroup.Add(new XElement(UtilConstants.GroupRefName, new XAttribute("Id", parentId)));
485 } 490 }
486 else 491 else
487 { 492 {
488 this.Messaging.Write(WarningMessages.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(), "Parent_", childId, "Group")); 493 if(!parentExists)
494 {
495 this.Messaging.Write(WarningMessages.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(), "Parent_", parentId, "Group"));
496 }
497 if (!childExists)
498 {
499 this.Messaging.Write(WarningMessages.ExpectedForeignRow(row.SourceLineNumbers, table.Name, row.GetPrimaryKey(), "Child_", childId, "Group"));
500 }
489 } 501 }
490 } 502 }
491 } 503 }