The BasePress Content Restriction feature gives you full control over the content in your knowledge base. It lets you decide who can see and read any of the articles, sections or KBs in your documentation.
To enable Content Restriction navigate to BasePress >Settings >Content Restriction and click on ‘Enable content restriction’.
Once activated you’ll find a new field in the knowledge base, sections and the articles’ editor called ‘Visible to’ with a list of user roles. You can select each role individually or in any combination in order to only allow users with a specific role to view certain content. By default all users can see new content. To restrict the content deselect the roles you don’t want to have access to the articles. Shown in the screenshot below:
There are some settings to adjust, in order to determine how content restriction functions in your knowledge base.
See the full list of content restriction settings.
The most important setting is: “Redirected Pages” since it influences what users can see. Redirected Pages has three options and they work as follow:
- All Pages
All the restricted knowledge bases, sections and articles are visible ONLY to users that have access to them. They won’t appear in any page, widget or search. Direct access to any of these pages will lead to a 404 error page as if the content isn’t present in the website.
All the restricted knowledge bases, sections and articles are visible to ALL users. They’ll appear in all pages, widgets and searches. It restricts only the content of the article. Anyone that doesn’t have the right role to view the content sees a content restriction notice. Optionally a content teaser with a login form.
- Section Only
This is a combination of the first two options. All restricted knowledge bases, sections and articles are visible ONLY to users that have access to them, similar to the first option. Yet if someone accesses an article with a direct link the article shows a restricted notice as in the second option.
This screenshot shows a restricted page notice: