Preview NTFS auto ensure in diagnostics
This commit is contained in:
@@ -638,6 +638,39 @@ namespace C4IT_IAM_Engine
|
||||
}
|
||||
}
|
||||
|
||||
public DirectoryEntry PreviewADGroup(string ouPath, IAM_SecurityGroup secGroup, string folderPath = null)
|
||||
{
|
||||
LogMethodBegin(MethodBase.GetCurrentMethod());
|
||||
try
|
||||
{
|
||||
secGroup.CreatedNewEntry = false;
|
||||
DirectoryEntry existingGroup = null;
|
||||
if (!ForceStrictAdGroupNames)
|
||||
existingGroup = FindGroupEntryFromFolderAcl(folderPath, secGroup.WildcardPattern);
|
||||
|
||||
if (existingGroup == null)
|
||||
existingGroup = FindGroupEntry(secGroup.Name);
|
||||
|
||||
if (existingGroup == null && !ForceStrictAdGroupNames && string.IsNullOrWhiteSpace(folderPath))
|
||||
existingGroup = FindGroupEntryByWildcard(ouPath, secGroup.WildcardPattern);
|
||||
|
||||
if (existingGroup == null)
|
||||
return null;
|
||||
|
||||
ApplyExistingGroup(secGroup, existingGroup);
|
||||
return existingGroup;
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
cLogManager.DefaultLogger.LogException(E);
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
{
|
||||
LogMethodEnd(MethodBase.GetCurrentMethod());
|
||||
}
|
||||
}
|
||||
|
||||
public DirectoryEntry CreateADGroup(string ouPath, IAM_SecurityGroup secGroup, List<UserPrincipal> users)
|
||||
{
|
||||
LogMethodBegin(MethodBase.GetCurrentMethod());
|
||||
|
||||
Reference in New Issue
Block a user