Log LIAM assembly identities and cap traverse depth
This commit is contained in:
@@ -1521,10 +1521,33 @@ namespace C4IT.LIAM
|
||||
|
||||
private cNtfsLevelRange GetTraverseLevelRange()
|
||||
{
|
||||
return GetConfiguredLevelRange(
|
||||
var range = GetConfiguredLevelRange(
|
||||
AdditionalConfigurationTraverseGroupsMinLevelKey,
|
||||
AdditionalConfigurationTraverseGroupsMaxLevelKey,
|
||||
"traverse group level range");
|
||||
if (range.IsValid
|
||||
&& !HasAdditionalConfigurationValue(AdditionalConfigurationTraverseGroupsMaxLevelKey)
|
||||
&& MaxDepth > 0)
|
||||
{
|
||||
var maxDepthLevel = MaxDepth - 1;
|
||||
if (range.IsConfigured)
|
||||
{
|
||||
range.MaxLevel = Math.Min(range.MaxLevel, maxDepthLevel);
|
||||
}
|
||||
else
|
||||
{
|
||||
range.IsConfigured = true;
|
||||
range.MaxLevel = maxDepthLevel;
|
||||
}
|
||||
|
||||
if (range.MinLevel > range.MaxLevel)
|
||||
{
|
||||
range.IsValid = false;
|
||||
range.ErrorMessage = $"AdditionalConfiguration traverse group level range is invalid because min level {range.MinLevel} is greater than effective max level {range.MaxLevel}.";
|
||||
}
|
||||
}
|
||||
|
||||
return range;
|
||||
}
|
||||
|
||||
private cNtfsLevelRange GetConfiguredLevelRange(string minKey, string maxKey, string label)
|
||||
@@ -1572,6 +1595,11 @@ namespace C4IT.LIAM
|
||||
return range;
|
||||
}
|
||||
|
||||
private bool HasAdditionalConfigurationValue(string key)
|
||||
{
|
||||
return !string.IsNullOrWhiteSpace(GetAdditionalConfigurationValue(key));
|
||||
}
|
||||
|
||||
private static bool IsSupportedPermissionManagedPathKind(cNtfsPathClassification classification, params eNtfsPathKind[] supportedKinds)
|
||||
{
|
||||
if (classification == null || supportedKinds == null || supportedKinds.Length == 0)
|
||||
|
||||
Reference in New Issue
Block a user