共用方式為


Control access to the Customer Center

 

Applies To: Dynamics CRM 2013

The Customer Center contains information that is designed to help you get the most from your implementation of Microsoft Dynamics CRM 2013 and Microsoft Dynamics CRM Online. However, you may want to control access to the Customer Center for some users.

This topic describes how you can control access to all or part of the Customer Center by using the same methods that can be used to customize the Navigation Bar areas of Microsoft Dynamics CRM.

Use the Privilege element to control access to Navigation Bar areas

Each area in the Navigation Bar is defined by an <Area> (SiteMap) element that contains a number of <SubArea> (SiteMap) elements. The following XML represents a simplified example:

<SiteMap>
 <Area Id="MA"> <!-- Marketing Area -->
  <Group Id="MA">
   <SubArea Id="nav_leads"
            Entity="lead"/> <!-- Displays Leads Grid -->
   <SubArea Id="nav_accts"
            Entity="account"/> <!-- Displays Accounts Grid -->
   <SubArea Id="nav_conts"
            Entity="contact"/> <!-- Displays Contacts Grid -->
   <SubArea Id="nav_lists"
            Entity="list"/> <!-- Displays Marketing Lists Grid -->
  </Group>
 </Area>
 <Area Id="CS"> <!-- Service Area -->
  <Group Id="CS">
   <SubArea Id="nav_cases"
            Entity="incident"/> <!-- Displays Cases Grid -->
   <SubArea Id="nav_accts"
            Entity="account" /> <!-- Displays Accounts Grid -->
   <SubArea Id="nav_contacts"
            Entity="contact"/> <!-- Displays Contacts Grid -->
   <SubArea Id="nav_managekb"
            Url="/_root/homepage.aspx?etc=127"> <!-- Displays Manage KB page -->
    <Privilege Entity="kbarticle"
               Privilege="Read,Write,Create"/>
   </SubArea>
  </Group>
 </Area>
</SiteMap>

Each <SubArea> (SiteMap) element provides navigation to a grid view for a particular entity or a specific page defined by a URL.

For those <SubArea> (SiteMap) elements that define an entity grid view, the entity grid will only be displayed when the security role for a user includes the read privilege for that entity

However, notice that one of these <SubArea> (SiteMap) elements has a URL defined rather than the name of a specific entity. The following XML shows that access to the /_root/homepage.aspx?etc=127 page is controlled using the <Privilege> (SiteMap) element.

<SubArea Id="nav_managekb"
         Url="/_root/homepage.aspx?etc=127"> <!-- Displays Manage KB page -->
 <Privilege Entity="kbarticle"
            Privilege="Read,Write,Create"/>
</SubArea>

In this case, the optional <Privilege> (SiteMap) element defines that only users with Read, Write, and Create privileges for the kbarticle entity will be able to view the Manage KB articles page located at /_root/homepage.aspx?etc=127. If this <SubArea> (SiteMap) element were included without the <Privilege> (SiteMap) element, all users would be able to access the page.

Note

If a user is not allowed to view any of the subareas within an area, that area will not appear in the Navigation Bar for that user.

Available options

The most obvious way to remove a <SubArea> (SiteMap) from the navigation is to delete it. However, we recommend that you comment out any SubAreas that you do not want to display rather than delete the element. This makes it easier to recover in the future.

For more precise control over access to a SubArea, use privileges. For more information, see Privileges by entity. In most cases, associating access to a privilege associated with an entity is sufficient. See Privileges not associated with an entity for additional privileges you can use. In this case, you should remove the “prv” prefix to the privilege name when you use it.

Example: Show the Customer Center to administrators only

You can modify the default definition of the Customer Center in the Site Map to limit access to only those users who have specific privileges. The following XML shows the default definition for the Customer Center <Area> (SiteMap).

<Area Id="HLP"
      ResourceId="Area_Help"
      ShowGroups="true"
      Icon="/_imgs/settings_24x24.gif"
      DescriptionResourceId="Help_Area_Description">
 <Group Id="HLP_GRP"
        ResourceId="Group_Help"
        DescriptionResourceId="Help_Description">
  <SubArea Id="Help_Resource_Center"
           Url="https://go.microsoft.com/fwlink/?LinkId=296269"
           ResourceId="Area_CustomerCenter"
           DescriptionResourceId="ResourceCenter_Area_Description"
           AvailableOffline="false">
   <Privilege Privilege="CreateEntity" />
   <Privilege Entity="solution" Privilege="Create" />
   <Privilege Privilege="ImportCustomization" />
  </SubArea>
 </Group>
</Area>

See Also

Change application navigation using the SiteMap
Edit the site map
Pass parameters to a URL using the SiteMap
SiteMap XML reference
SiteMap schema