This approach applies to legacy Optimizely CMS / EPiServer solutions that use the classic admin interface and web.config-based access rules. It does not apply to CMS 12 or CMS 13.
Overview
In legacy EPiServer/Optimizely CMS implementations, editor and administrator features are separated into two interfaces: Edit and Admin.
Edit mode gives you fine-grained control over content permissions, but sometimes teams need to expose a specific admin feature, such as Categories, without granting full access to the entire admin interface.
A common requirement is to let editors manage categories while keeping the rest of the admin area restricted to administrator roles.
Grant Access to Categories Only
In the classic admin UI, access is controlled through web.config. By default, admin pages are usually limited to roles such as WebAdmins and Administrators.
If you want editor roles such as CmsEditors or WebEditors to access only the Categories screen, add the following configuration:
<location path="EPiServer/CMS/admin/Categories.aspx">
<system.web>
<authorization>
<allow roles="CmsEditors, WebEditors, WebAdmins, Administrators" />
<deny users="*" />
</authorization>
</system.web>
</location>
With this in place, users in the WebEditors role can open /EPiServer/CMS/admin/Categories.aspx directly without receiving access to other admin functionality.
Add a Navigation Link
Direct access works, but it is not very convenient for editors. A better experience is to surface Categories in the CMS navigation.
The simplest approach is to add a menu item in web.config:
<episerver.shell>
<navigation>
<add menupath="/global/Categories"
sortindex="1000"
text="Categories"
url="/EPiServer/CMS/admin/Categories.aspx" />
</navigation>
</episerver.shell>
This works, but there is one downside: the menu item is visible to all users, even if they do not have permission to access the Categories page.
Use a Role-Aware MenuProvider
If you want the Categories menu item to appear only for users who are actually allowed to use it, the better approach is to use a custom MenuProvider.
This lets you control both visibility and access in code, which keeps the navigation cleaner and avoids exposing irrelevant menu items to other users.
The following example adds a Categories submenu item under the CMS section with role-aware access control:
If you want Categories to appear as a top-level global item instead, change /global/cms/categories to /global/categories.
Why This Approach Is Useful
- Editors get access to exactly one admin feature without broader admin permissions.
- The navigation is more intuitive for content teams.
- Role-aware menu items reduce confusion and keep the UI cleaner.
Learn More
If you are new to menu providers, the legacy Optimizely CMS 11 documentation is a good place to start: Extend the CMS navigation.
This is a useful pattern for older Optimizely CMS 11 projects where editors need access to selected admin tools without opening up the full admin interface.
0 comments :
Post a Comment