Avoid own permission groups in traverse group
This commit is contained in:
@@ -571,7 +571,8 @@ namespace C4IT_IAM_SET
|
||||
var currentTraverseLevel = lvl;
|
||||
var defaultTraverseLoopIndex = lvl;
|
||||
var hasTraverseBoundary = !string.IsNullOrWhiteSpace(GetNormalizedTraverseBoundaryPath());
|
||||
var processedNearestTraverseParent = false;
|
||||
var sourcePath = NormalizeDirectoryPath(newDataArea.IAM_Folders[0].technicalName);
|
||||
var sourcePermissionGroupsAdded = false;
|
||||
|
||||
// Überprüfen der Templates
|
||||
if (templates == null)
|
||||
@@ -935,9 +936,16 @@ namespace C4IT_IAM_SET
|
||||
if (parentTraverseGroup != null || !string.IsNullOrWhiteSpace(parentTraverseGroupName))
|
||||
{
|
||||
var displayTraverseGroupName = parentTraverseGroup?.Name ?? parentTraverseGroupName;
|
||||
if (!processedNearestTraverseParent)
|
||||
var isSourceTraversePath = PathsEqual(parent.FullName, sourcePath);
|
||||
if (!sourcePermissionGroupsAdded)
|
||||
{
|
||||
DefaultLogger.LogEntry(LogLevels.Debug, "Verarbeite SecurityGroups bei oberster Ebene.");
|
||||
if (isSourceTraversePath)
|
||||
{
|
||||
DefaultLogger.LogEntry(LogLevels.Debug, $"Skip direct permission group membership for own Traverse-Gruppe '{displayTraverseGroupName}' on '{parent.FullName}'.");
|
||||
}
|
||||
else
|
||||
{
|
||||
DefaultLogger.LogEntry(LogLevels.Debug, "Verarbeite SecurityGroups in erster uebergeordneter Traverse-Gruppe.");
|
||||
foreach (var currentSecGroup in newSecurityGroups.IAM_SecurityGroups)
|
||||
{
|
||||
if (currentSecGroup == null)
|
||||
@@ -962,12 +970,11 @@ namespace C4IT_IAM_SET
|
||||
if (!TryEnsureGlobalGroupMembershipWithRetry(domainContext, parentTraverseGroup, currentSecGroup))
|
||||
continue;
|
||||
}
|
||||
traverseGroup = parentTraverseGroup;
|
||||
traverseGroupName = displayTraverseGroupName;
|
||||
processedNearestTraverseParent = true;
|
||||
|
||||
sourcePermissionGroupsAdded = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(traverseGroupName))
|
||||
{
|
||||
try
|
||||
@@ -992,7 +999,9 @@ namespace C4IT_IAM_SET
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
traverseGroup = parentTraverseGroup;
|
||||
traverseGroupName = displayTraverseGroupName;
|
||||
try
|
||||
{
|
||||
if (!WhatIf && parentTraverseGroup != null)
|
||||
|
||||
Reference in New Issue
Block a user