Skip NTFS ensure and traverse on share roots
This commit is contained in:
@@ -648,6 +648,15 @@ namespace C4IT.LIAM
|
||||
bool ensureTraverseGroups = false,
|
||||
bool whatIf = false)
|
||||
{
|
||||
if (!IsPermissionManagedFolderPath(folderPath))
|
||||
{
|
||||
return Task.FromResult(new ResultToken(System.Reflection.MethodBase.GetCurrentMethod().ToString())
|
||||
{
|
||||
resultErrorId = 30008,
|
||||
resultMessage = $"NTFS permission ensure is only supported for folder paths. Shares, DFS namespaces and server roots are skipped: {folderPath}"
|
||||
});
|
||||
}
|
||||
|
||||
var parentPath = Directory.GetParent(folderPath)?.FullName;
|
||||
var engine = CreateFilesystemEngine(
|
||||
folderPath,
|
||||
@@ -704,6 +713,7 @@ namespace C4IT.LIAM
|
||||
groupTraverseTag = GetRequiredCustomTag("Filesystem_GroupTraverseTag"),
|
||||
groupDLTag = requiresDomainLocalTag ? GetRequiredCustomTag("Filesystem_GroupDomainLocalTag") : string.Empty,
|
||||
groupGTag = GetRequiredCustomTag("Filesystem_GroupGlobalTag"),
|
||||
CanManagePermissionsForPath = IsPermissionManagedFolderPath,
|
||||
forceStrictAdGroupNames = IsAdditionalConfigurationEnabled("ForceStrictAdGroupNames")
|
||||
};
|
||||
|
||||
@@ -726,6 +736,12 @@ namespace C4IT.LIAM
|
||||
|| rawValue.Equals("yes", StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
public bool IsPermissionManagedFolderPath(string path)
|
||||
{
|
||||
var classification = ClassifyPath(path);
|
||||
return classification != null && classification.Kind == eNtfsPathKind.Folder;
|
||||
}
|
||||
|
||||
private IEnumerable<IAM_SecurityGroupTemplate> BuildSecurityGroupTemplates()
|
||||
{
|
||||
var templates = new List<IAM_SecurityGroupTemplate>();
|
||||
|
||||
Reference in New Issue
Block a user