Fix NTFS ensure group reuse and parent mapping
This commit is contained in:
@@ -267,6 +267,9 @@ namespace C4IT.LIAM
|
|||||||
? new DirectoryInfo(classification.NormalizedPath).CreationTimeUtc.ToString("s")
|
? new DirectoryInfo(classification.NormalizedPath).CreationTimeUtc.ToString("s")
|
||||||
: DateTime.MinValue.ToString("s")
|
: DateTime.MinValue.ToString("s")
|
||||||
};
|
};
|
||||||
|
folderData.Level = classification.Level;
|
||||||
|
if (folderData.Parent == null && !string.IsNullOrWhiteSpace(classification.ParentPath))
|
||||||
|
folderData.Parent = new cNtfsResultFolder() { Path = classification.ParentPath };
|
||||||
var parentPath = !string.IsNullOrWhiteSpace(classification.ParentPath)
|
var parentPath = !string.IsNullOrWhiteSpace(classification.ParentPath)
|
||||||
? classification.ParentPath
|
? classification.ParentPath
|
||||||
: classification.ParentBoundaryPath;
|
: classification.ParentBoundaryPath;
|
||||||
@@ -1147,7 +1150,11 @@ namespace C4IT.LIAM
|
|||||||
this.Level = NtfsFolder.Level;
|
this.Level = NtfsFolder.Level;
|
||||||
this.DataType = eLiamDataAreaTypes.NtfsFolder;
|
this.DataType = eLiamDataAreaTypes.NtfsFolder;
|
||||||
this.CreatedDate = NtfsFolder.CreatedDate;
|
this.CreatedDate = NtfsFolder.CreatedDate;
|
||||||
if (ntfsParent != null)
|
if (!string.IsNullOrWhiteSpace(parentPathOverride))
|
||||||
|
{
|
||||||
|
this.ParentUID = GetUniqueDataAreaID(parentPathOverride);
|
||||||
|
}
|
||||||
|
else if (ntfsParent != null)
|
||||||
{
|
{
|
||||||
this.ParentUID = GetUniqueDataAreaID(ntfsParent.Path);
|
this.ParentUID = GetUniqueDataAreaID(ntfsParent.Path);
|
||||||
}
|
}
|
||||||
@@ -1155,8 +1162,6 @@ namespace C4IT.LIAM
|
|||||||
{
|
{
|
||||||
this.ParentUID = GetUniqueDataAreaID(this.Provider.RootPath);
|
this.ParentUID = GetUniqueDataAreaID(this.Provider.RootPath);
|
||||||
}
|
}
|
||||||
if (string.IsNullOrWhiteSpace(this.ParentUID) && !string.IsNullOrWhiteSpace(parentPathOverride))
|
|
||||||
this.ParentUID = GetUniqueDataAreaID(parentPathOverride);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetUniqueDataAreaID(string fullPath)
|
public static string GetUniqueDataAreaID(string fullPath)
|
||||||
|
|||||||
@@ -617,7 +617,7 @@ namespace C4IT_IAM_Engine
|
|||||||
if (existingGroup == null)
|
if (existingGroup == null)
|
||||||
existingGroup = FindGroupEntry(secGroup.Name);
|
existingGroup = FindGroupEntry(secGroup.Name);
|
||||||
|
|
||||||
if (existingGroup == null && !ForceStrictAdGroupNames)
|
if (existingGroup == null && !ForceStrictAdGroupNames && string.IsNullOrWhiteSpace(folderPath))
|
||||||
existingGroup = FindGroupEntryByWildcard(ouPath, secGroup.WildcardPattern);
|
existingGroup = FindGroupEntryByWildcard(ouPath, secGroup.WildcardPattern);
|
||||||
|
|
||||||
if (existingGroup == null)
|
if (existingGroup == null)
|
||||||
|
|||||||
Reference in New Issue
Block a user