Skip to content

Commit

Permalink
Update LDAPCPSE.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Yvand committed Feb 6, 2024
1 parent 5eb1e29 commit d20e27e
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions Yvand.LDAPCPSE/Yvand.LdapClaimsProvider/LDAPCPSE.cs
Original file line number Diff line number Diff line change
Expand Up @@ -363,10 +363,9 @@ protected void AugmentEntity(Uri context, SPClaim entity, SPClaimProviderContext
return;
}

using (new SPMonitoredScope($"[{ClaimsProviderName}] Augment entity whith value \"{decodedEntity.ClaimType}", 3000))
using (new SPMonitoredScope($"[{ClaimsProviderName}] Augmentation for user \"{decodedEntity.Value}", 3000))
{
if (!ValidateSettings(context)) { return; }

this.Lock_LocalConfigurationRefresh.EnterReadLock();
OperationContext currentContext = null;
try
Expand All @@ -376,15 +375,14 @@ protected void AugmentEntity(Uri context, SPClaim entity, SPClaimProviderContext

if (!this.Settings.EnableAugmentation) { return; }

Logger.Log($"[{Name}] Starting augmentation for user '{decodedEntity.Value}'.", TraceSeverity.Verbose, EventSeverity.Information, TraceCategory.Augmentation);
//ClaimTypeConfig groupClaimTypeSettings = this.Settings.RuntimeClaimTypeConfigList.FirstOrDefault(x => x.DirectoryObjectType == DirectoryObjectType.Group);
//if (groupClaimTypeSettings == null)
//{
// Logger.Log($"[{Name}] No claim type with DirectoryObjectType 'Group' was found, please check claims mapping table.",
// TraceSeverity.High, EventSeverity.Error, TraceCategory.Augmentation);
// return;
//}
if (Settings.GroupIdentifierClaimTypeConfig == null)
{
Logger.Log($"[{Name}] No object with DirectoryObjectType 'Group' was found, please check claims mapping table.",
TraceSeverity.High, EventSeverity.Error, TraceCategory.Augmentation);
return;
}

Logger.Log($"[{Name}] Starting augmentation for user '{decodedEntity.Value}'.", TraceSeverity.Verbose, EventSeverity.Information, TraceCategory.Augmentation);
currentContext = new OperationContext(this.Settings as LDAPCPSettings, OperationType.Augmentation, String.Empty, decodedEntity, context, null, null, Int32.MaxValue);
Stopwatch timer = new Stopwatch();
timer.Start();
Expand Down

0 comments on commit d20e27e

Please sign in to comment.