Skip NTFS ensure and traverse on share roots
This commit is contained in:
@@ -52,6 +52,7 @@ namespace C4IT_IAM_SET
|
||||
public ICollection<string> ownerUserSids;
|
||||
public ICollection<string> readerUserSids;
|
||||
public ICollection<string> writerUserSids;
|
||||
public Func<string, bool> CanManagePermissionsForPath;
|
||||
public bool forceStrictAdGroupNames;
|
||||
public bool WhatIf;
|
||||
|
||||
@@ -481,6 +482,22 @@ namespace C4IT_IAM_SET
|
||||
break;
|
||||
}
|
||||
|
||||
if (CanManagePermissionsForPath != null && !CanManagePermissionsForPath(parent.FullName))
|
||||
{
|
||||
DefaultLogger.LogEntry(LogLevels.Debug, $"Überspringe Traverse-Verarbeitung für nicht verwaltbaren NTFS-Pfad: {parent.FullName}");
|
||||
parent = parent.Parent;
|
||||
if (parent != null)
|
||||
{
|
||||
lvl = DataArea.GetRelativePath(parent.FullName, baseFolder).Count(n => n == Path.DirectorySeparatorChar);
|
||||
DefaultLogger.LogEntry(LogLevels.Debug, $"Neue Ebene (lvl) nach Überspringen: {lvl}");
|
||||
}
|
||||
else
|
||||
{
|
||||
DefaultLogger.LogEntry(LogLevels.Debug, "Parent nach Überspringen ist null.");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
DefaultLogger.LogEntry(LogLevels.Debug, $"Hole ACL für Ordner: {parent.FullName}");
|
||||
AuthorizationRuleCollection ACLs = null;
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user