To show or hide a sub area in SiteMap
based on access control security roles, one can easily do this using the Privilege tag in the SiteMap
as follows:
<SubArea Id=”crm_myentity” Entity=”crm_myentity”>
<Privilege Entity=”crm_myentity” Privilege=”Read” />
</SubArea>
Based on the above, this SubArea
will only be shown to users who have security roles with read privilege of the custom entity: crm_myentity
.
You can add the privilege tag above to any SubArea
and the entity in the privilege tag can be any entity and doesn’t have to be the same one as the sub area. For example, the following is also applicable:
<SubArea Id=”contact” Entity=”contact” Title=”Contacts”>
<Privilege Entity=”crm_myentity” Privilege=”Read” />
</SubArea>
This will hide the contact SubArea
for users without the read privilege for the entity crm_myentity
. You can mix and match as much as you want to show and hide any SubArea
in the SiteMap
based on any entity you require whether they are customisable. System or custom entities.