Adxstudio is probably the most commonly used portal solution for Microsoft Dynamics CRM. It comes with the following 7 basic portals (Community, Company, Conference, Customer, Government,Partner and Retail) which can either be extended for any customer needs or a completely new portal can be developed using the framework.
One of the very common requirement for any portal solution is to provide access to specific content only to authenticated users.
In this blog post, we will discuss how to restrict access to a web page.
Portal users can be classified in three basic categories:
- Anonymous User – someone who is visiting the portal
- Authenticated User – someone who has got a login credential for the portal
- Administrator – someone who manages the portal
Scenario: We will restrict access to Events web page in Customer Portal only to Authenticated Users.
For this example, we will use Adxstudio Customer Portal; however the solution will work with any other portals.
How to achieve this?
- Browse to the Adxstudio Customer Portal page. Find that Events page is accessible by Anonymous users.
2. Now login to the Dynamics CRM system which is integrated with this portal and navigate to Portals | Web Page Access Control Rules section.
3. Click on the + New in the Command Bar to create a new Web Page Access Control record.
4. Provide the following details to create the record.
|Field||Description||Value to be provided|
|Name||A descriptive name for the rule.||Grant Event Page Access Only to Authenticated Users|
|Website||The website that this rule applies to; must match the website of the page to which this rule is applied. Filters Web Page.||Customer Portal|
|Web Page||The Web Page that this rule applies to.
The rule will affect not only the page but all child pages of the page, therefore making this attribute select the branch of the website to which the rule will apply. If a rule is applied to the home page, then it will apply to the entire Portal.
|Right||Grant Change: allows a user in a web role associated with the rule to publish content changes for this page and all child pages of this page.
Restrict Read: used to limit viewing of a page (and its child pages) and its content to only specific users.
Grant Change takes precedence over restrict read.
|Description||A description of the rule. Optional.|
5. After Saving the record, add Published state in the Publishing States sub-grid.
6. Now add Authenticated Users Web Role under Web Roles sub-grid to the Access Control Rule.
Note: By default, every portal user who has not been assigned any other web role is part of Authenticated Users web role. A custom web role can also be configured in the system and associated with this Access Control Rule.
7. Now Reset the Cache of the Portal (if it is Adxstdio SaaS based) or reset the IIS.
8. Refresh the Portal page now. You can find that Events page is no longer available to Anonymous users.
9. Login to the portal as a portal user.
10. Now find the Events page. So only Authenticated Users have got access to the Events page.