Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


There are two ways to implement Sitecore roles. Ony one should be chosen:

    • Multi-role Role using fields in the contact (or lead) record to specify the Sitecore role(s). This is the default. One or more Sitecore roles have the same names as selections in a custom multi-pick list in the Salesforce contact (or lead).
    • Single-Role using the Salesforce Account to specify the Sitecore role. All contacts that belong to the Account will be Sitecore users in a Sitecore role with the same name as the Salesforce Account. Single-Role is not as flexible as Multi-role.

...

The Sitecore role equates to the Salesforce account. In this configuration, each contact can only have one role (the associated Account). An account can be made a Sitecore role by checking the Sitecore Role checkbox in the Sitecore section of Account. Single role  Single-Role cannot be used with leads because they do not have a relationship with the Accounts object. This section covers the additional steps to set up Single Role role support for all Salesforce editions.

...

Please ensure that the Salesforce Configuration (Required) steps at the beginning of this document have been completed.

Enabling the Switching Providers for Single Role

...

Add new providers by domains
Anchor
EnableSwitchingProviders
EnableSwitchingProviders

Ensure the standard Sitecore security providers have been configured. After making these changes you need to configure the S4S security providers by adding the following elements (Single Role Only):


  •  To the sitecore → switchingProviders → membership the sitecore » switchingProviders » membership element (the order is not important)
Code Block
languagexml
<provider providerName="salesforce" storeFullNames="false" wildcard="%" domains="salesforce" />


  • To the sitecore → switchingProviders → roleManager the sitecore » switchingProviders » roleManager element (the order is not important)
Code Block
languagexml
<provider providerName="salesforce" storeFullNames="false" wildcard="%" domains="salesforce" />


  • To the sitecore → switchingProviders → profile the sitecore » switchingProviders » profile element (it must come before the "sql" definition in this group)
Code Block
languagexml
<provider providerName="salesforce" storeFullNames="false" wildcard="%" domains="salesforce" />

Enabling the Switching Providers

...

Example

<switchingProviders>
  <membership>
      <provider providerName="sql" storeFullNames="true" wildcard="%" domains="*" />
    <provider providerName="salesforce" storeFullNames="false" wildcard="%" domains="salesforce" />
  </membership>
  <roleManager>
    <provider providerName="sql" storeFullNames="true" wildcard="%" domains="*" />
    <provider providerName="salesforce" storeFullNames="false" wildcard="%" domains="salesforce" />
    <!—If using Salesforce S4S Multiple Role, use the following line-->
    <!--provider providerName="salesforceContact" storeFullNames="false" wildcard="%" domains="salesforce" /-->
  
  </roleManager>
  <profile>
    <!-- This line must go before the SQL provider which can handle all requests -->
    <provider providerName="salesforce" storeFullNames="false" wildcard="%" domains="salesforce" />
    <provider providerName="sql" storeFullNames="true" wildcard="%" domains="*" />
  </profile>
</switchingProviders>

Add the Membership, Role and Profile Entries


  • Add the following element to the system.

...

  • web » membership » providers section of the web.config file:
Code Block
languagexml
<add name="salesforce" type="FuseIT.Sitecore.SalesforceSecurityProvider.SalesforceMembershipProvider, FuseIT.Sitecore.SalesforceSecurityProvider" readOnly="false" connectionStringName="S4SConnString" applicationName="sitecore" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0" passwordStrengthRegularExpression=".*" requiresUniqueEmail="false" passwordFieldName="SitecorePassword__c" userNameFieldName="SitecoreUsername__c" isEncryptedFieldName="SitecorePasswordEncrypted__c"/>


  • Add the following element to the system.

...

  • web » roleManager » providers section of the web.config file:
Code Block
languagexml
<add name="salesforce" type="FuseIT.Sitecore.SalesforceSecurityProvider.SalesforceRoleProvider, FuseIT.Sitecore.SalesforceSecurityProvider" connectionStringName="S4SConnString" readOnly="false"/>


  • Add the following element to the system.web

...

  • » profile » providers section of the web.config file

...

  • :
Code Block
languagexml
<add name="salesforce" type="FuseIT.Sitecore.SalesforceSecurityProvider.SalesforceProfileProvider, FuseIT.Sitecore.SalesforceSecurityProvider" connectionStringName="S4SConnString" readOnly="false"/>