Skip to content

Commit

Permalink
Publish v14 (#97)
Browse files Browse the repository at this point in the history
* Add method LDAPCPConfig.CreateDefaultConfiguration

* Update method LDAPCPConfig.CreateDefaultConfiguration

* Simplify method LDAPCPConfig.ApplyConfiguration

* Update LDAPCPConfig.cs

* Use helper SPClaimTypes.Equals when possible

* Investigating issue #87

* Test workaround to bug #87

* Fixing #87

* Fix #87

* Fix for bug #87 in scenario where local config already exists but must be recreated

* Update CHANGELOG.md
  • Loading branch information
Yvand authored Sep 2, 2019
1 parent 9b2d063 commit aedfa5d
Show file tree
Hide file tree
Showing 6 changed files with 187 additions and 81 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change log for LDAPCP

## Unreleased

* Add method LDAPCPConfig.CreateDefaultConfiguration
* Fix bug: randomly, LDAPCP returned results that were missing their domain name. In SharePoint logs, a DirectoryServicesCOMException error was recorded. https://github.com/Yvand/LDAPCP/issues/87

## LDAPCP 13.0.20190621.905 enhancements & bug-fixes - Published in June 21, 2019

* Add a default mapping to populate the email of groups
Expand Down
2 changes: 1 addition & 1 deletion LDAPCP.Tests/UnitTestsHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
[SetUpFixture]
public class UnitTestsHelper
{
public static readonly ldapcp.LDAPCP ClaimsProvider = new ldapcp.LDAPCP(UnitTestsHelper.ClaimsProviderName);
public static string ClaimsProviderName => "LDAPCP";
public static readonly ldapcp.LDAPCP ClaimsProvider = new ldapcp.LDAPCP(UnitTestsHelper.ClaimsProviderName);
public static readonly string ClaimsProviderConfigName = TestContext.Parameters["ClaimsProviderConfigName"];
public static Uri TestSiteCollUri;
public static readonly string TestSiteRelativePath = $"/sites/{TestContext.Parameters["TestSiteCollectionName"]}";
Expand Down
15 changes: 7 additions & 8 deletions LDAPCP/Features/LDAPCP/LDAPCP.EventReceiver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,14 @@ private void ExecBaseFeatureActivated(SPFeatureReceiverProperties properties)
{
ClaimsProviderLogging svc = ClaimsProviderLogging.Local;
ClaimsProviderLogging.Log($"[{LDAPCP._ProviderInternalName}] Activating farm-scoped feature for claims provider \"{LDAPCP._ProviderInternalName}\"", TraceSeverity.High, EventSeverity.Information, ClaimsProviderLogging.TraceCategory.Configuration);

var spTrust = LDAPCP.GetSPTrustAssociatedWithCP(LDAPCP._ProviderInternalName);
if (spTrust != null)
LDAPCPConfig existingConfig = LDAPCPConfig.GetConfiguration(ClaimsProviderConstants.CONFIG_NAME);
if (existingConfig == null)
{
LDAPCPConfig.CreateDefaultConfiguration();
}
else
{
LDAPCPConfig existingConfig = LDAPCPConfig.GetConfiguration(ClaimsProviderConstants.CONFIG_NAME);
if (existingConfig == null)
LDAPCPConfig.CreateConfiguration(ClaimsProviderConstants.CONFIG_ID, ClaimsProviderConstants.CONFIG_NAME, spTrust.Name);
else
ClaimsProviderLogging.Log($"[{LDAPCP._ProviderInternalName}] Use configuration \"{ClaimsProviderConstants.CONFIG_NAME}\" found in the configuration database", TraceSeverity.High, EventSeverity.Information, ClaimsProviderLogging.TraceCategory.Configuration);
ClaimsProviderLogging.Log($"[{LDAPCP._ProviderInternalName}] Use configuration \"{existingConfig.Name}\" found in the configuration database", TraceSeverity.High, EventSeverity.Information, ClaimsProviderLogging.TraceCategory.Configuration);
}
}
catch (Exception ex)
Expand Down
Loading

0 comments on commit aedfa5d

Please sign in to comment.