diff --git a/LDAPCP/LDAPCP.cs b/LDAPCP/LDAPCP.cs index 0101087..fbc3f29 100644 --- a/LDAPCP/LDAPCP.cs +++ b/LDAPCP/LDAPCP.cs @@ -1032,7 +1032,7 @@ protected override void FillClaimValueTypes(List claimValueTypes) protected override void FillClaimsForEntity(Uri context, SPClaim entity, List claims) { - throw new NotImplementedException(); + Augment(context, entity, null, claims); } protected override void FillClaimsForEntity(Uri context, SPClaim entity, SPClaimProviderContext claimProviderContext, List claims) @@ -1044,8 +1044,8 @@ protected override void FillClaimsForEntity(Uri context, SPClaim entity, SPClaim /// Perform augmentation of entity supplied /// /// - /// - /// + /// entity to augment + /// Can be null /// protected virtual void Augment(Uri context, SPClaim entity, SPClaimProviderContext claimProviderContext, List claims) { @@ -1057,7 +1057,7 @@ protected virtual void Augment(Uri context, SPClaim entity, SPClaimProviderConte this.Lock_Config.EnterReadLock(); try { - LdapcpLogging.LogDebug(String.Format("[{0}] AugmentationEnabledProp: {1}.", ProviderInternalName, CurrentConfiguration.AugmentationEnabledProp.ToString())); + LdapcpLogging.LogDebug(String.Format("[{0}] Original entity to augment: '{1}', augmentation enabled: {2}.", ProviderInternalName, entity.Value, CurrentConfiguration.AugmentationEnabledProp)); if (!this.CurrentConfiguration.AugmentationEnabledProp) return; if (String.IsNullOrEmpty(this.CurrentConfiguration.AugmentationClaimTypeProp)) { @@ -1074,17 +1074,22 @@ protected virtual void Augment(Uri context, SPClaim entity, SPClaimProviderConte } SPClaim decodedEntity; - //SPClaimProviderManager cpm = SPClaimProviderManager.Local; - //if (!SPClaimProviderManager.IsEncodedClaim(entity.Value)) decodedEntity = entity; - //else decodedEntity = cpm.DecodeClaimFromFormsSuffix(entity.Value); if (SPClaimProviderManager.IsUserIdentifierClaim(entity)) decodedEntity = SPClaimProviderManager.DecodeUserIdentifierClaim(entity); else - decodedEntity = SPClaimProviderManager.Local.DecodeClaim(entity.Value); + { + if (SPClaimProviderManager.IsEncodedClaim(entity.Value)) + decodedEntity = SPClaimProviderManager.Local.DecodeClaim(entity.Value); + else + decodedEntity = entity; + } SPOriginalIssuerType loginType = SPOriginalIssuers.GetIssuerType(decodedEntity.OriginalIssuer); if (loginType != SPOriginalIssuerType.TrustedProvider && loginType != SPOriginalIssuerType.ClaimProvider) + { + LdapcpLogging.LogDebug(String.Format("[{0}] Not trying to augment '{1}' because OriginalIssuer is '{2}'.", ProviderInternalName, decodedEntity.Value, decodedEntity.OriginalIssuer)); return; + } RequestInformation infos = new RequestInformation(CurrentConfiguration, RequestType.Augmentation, ProcessedAttributes, null, decodedEntity, context, null, null, Int32.MaxValue); DirectoryEntry[] directories = GetLDAPServers(infos); diff --git a/LDAPCP/Properties/AssemblyInfo.cs b/LDAPCP/Properties/AssemblyInfo.cs index 2cb6688..db745c0 100644 --- a/LDAPCP/Properties/AssemblyInfo.cs +++ b/LDAPCP/Properties/AssemblyInfo.cs @@ -34,5 +34,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("5")] +[assembly: AssemblyFileVersion("5.1")]