fix: include NTFS share ACLs in diagnostics output

This commit is contained in:
Meik
2026-03-09 09:41:46 +01:00
parent 3e0ae58e9d
commit 58d7529329

View File

@@ -659,7 +659,8 @@ namespace LiamWorkflowDiagnostics
var result = new List<DataAreaEntry>();
foreach (var dataArea in dataAreas ?? Enumerable.Empty<cLiamDataAreaBase>())
{
var ntfs = dataArea as cLiamNtfsFolder;
var ntfsPermissionArea = dataArea as cLiamNtfsPermissionDataAreaBase;
var ntfsFolder = dataArea as cLiamNtfsFolder;
var adGroup = dataArea as cLiamAdGroupAsDataArea;
var exchMailbox = dataArea as cLiamExchangeSharedMailbox;
var exchDistribution = dataArea as cLiamExchangeDistributionGroup;
@@ -667,7 +668,7 @@ namespace LiamWorkflowDiagnostics
var owner = exchMailbox?.OwnerGroupIdentifier
?? exchDistribution?.OwnerGroupIdentifier
?? adGroup?.ManagedBySID
?? ntfs?.OwnerGroupIdentifier
?? ntfsPermissionArea?.OwnerGroupIdentifier
?? string.Empty;
var write = exchMailbox != null
@@ -675,16 +676,16 @@ namespace LiamWorkflowDiagnostics
: exchDistribution != null
? exchDistribution.MemberGroupSid
: adGroup?.UID
?? ntfs?.WriteGroupIdentifier
?? ntfsPermissionArea?.WriteGroupIdentifier
?? string.Empty;
var read = exchMailbox != null
? exchMailbox.SendAsGroupSid
: ntfs?.ReadGroupIdentifier
: ntfsPermissionArea?.ReadGroupIdentifier
?? string.Empty;
var traverse = ntfs?.TraverseGroupIdentifier ?? string.Empty;
var created = ntfs?.CreatedDate ?? string.Empty;
var traverse = ntfsPermissionArea?.TraverseGroupIdentifier ?? string.Empty;
var created = ntfsFolder?.CreatedDate ?? string.Empty;
var description = adGroup?.Description ?? string.Empty;
result.Add(new DataAreaEntry
@@ -704,7 +705,7 @@ namespace LiamWorkflowDiagnostics
ConfigurationId = !string.IsNullOrWhiteSpace(_session?.ProviderConfigObjectId)
? _session.ProviderConfigObjectId
: (!string.IsNullOrWhiteSpace(_session?.ProviderConfigId) ? _session.ProviderConfigId : string.Empty),
BaseFolder = ntfs?.Share?.TechnicalName ?? dataArea.Provider?.RootPath ?? string.Empty,
BaseFolder = ntfsFolder?.Share?.TechnicalName ?? dataArea.Provider?.RootPath ?? string.Empty,
UniqueId = dataArea.UID ?? string.Empty,
DataAreaType = ((int)dataArea.DataType).ToString()
});