Is this really the version you are looking for? Kentico Xperience 11 Documentation is no longer updated. Use the switcher in the header to choose your product version.
Kentico allows you to restrict access to certain content based on the current user. This approach uses Page-level permissions (ACLs). These restrictions apply on pages in the Pages application**,** pages listed by web parts, and various dialogs where the content tree is displayed.
Content personalization in Kentico EMS
This approach checks the current user's permissions for the page that is being displayed. If you want to personalize your site to achieve more advanced scenarios according to completely custom conditions, use Content personalization.
Content restrictions summary
When the user is not authenticated, the system uses a special user Public anonymous User (public).
You can also configure web parts to consider these permissions and list pages based on these permissions.
If a user has the Read permission for a child page but not for its parent, the child page is not displayed either. In case that a user doesn't have the permissions for any page at all, a message is displayed in the place of the content tree, informing the user about insufficient permissions to see the root page.
In this example, you will learn how to display the Products section only to members of the Customers and Partners roles. They, you will see how to display the Smartphones category only to members of the Partners role.
Note that this example uses the sample Corporate site for illustration.
First, create the objects you will work with in this example:
Assign page-level permissions to the created roles:
Navigate to Settings -> Security & Membership and set Check page permissions to All pages.
Open the Pages application and select the root of the content tree.
Switch to the Properties -> Security tab.
Add the Public anonymous user (public) user and Customers and Partners roles to the list.
Grant the Read permissions to the user and roles.
Now hide the product categories from public users:
In the content tree, navigate to /Products/Smartphones and switch to the Properties -> Security tab.
Click the Change permission inheritance link to break the inheritance.
In the following dialog, choose Break inheritance and copy parent permissions.
Select the Public Anonymous User (public) and deny the Read permission.
Repeat the previous steps for the Laptops and Tablets page.
Also deny the Smartphones page for the Customers role.
The permissions are not checked by web parts by default, so we need to configure the web parts so that they check the Read permission of the current user.
Sign out. If you mouse-over the Products menu item as a public user, you will see that the sub-categories representing the restricted sections are no longer displayed.
Sign in as user Customer1 (using the mini‑form at the top right of the page).
Navigate to Products via the main menu. As you can see, the Smartphones section and Smartphone products are not displayed to this user.
Now sign out and sign in again as user Partner1. You will see all categories and products.
You have learned how restrict access to content based on user permissions.