Wednesday 23 August 2017

Editor Access to Episerver Categories Admin Functionality

Overview


EPiServer separates the functionality for website editors and site administrators by using two distinct user interfaces (Edit & Admin interface).
Edit mode offers granular control by allowing you to set access rights for content.

The requirement is to provide editor access to a particular admin functionality i.e Categories, without providing full access to the user to the admin interface.

Access to the admin mode is defined via a location path configuration set in web config, with access to users in the WebAdmins and the Administrators roles. There is no option available to provide access to functionality to other roles within the admin interface.

Solution


Add the following entry in web.config to give WebEditors access to Categories functionality in the admin interface.

  
    
      
        
        
      
    
  

If user login in the CMS with a role WebEditors and try to access page http://www.yourdomain.com/EPiServer/CMS/admin/Categories.aspx, the user will be able to access Categories functionality without exposing any other Admin functionality.

Taking this example one step further I want to have a menu item in Episerver CMS global navigation so WebEditors can click the menu to get access to Categories.

The simple way to achieve this to add Episerver navigation menu item in web.config and done with it.


   
       
    
  

The potential problem with the above solution is the Categories menu item will visible to all users regardless of their role or their ability access admin Categories functionality.

To restrict Categories menu for certain roles and we have to write some code to unleash the potential of Episerver MenuProviders.

To add Categories sub menu item in global menu section inside CMS menu with access rights.


You can change "/global/cms/categories" to "/global/categories" to make categories as the main menu item.

If you are new to MenuProvider I recommend reading through the documentation http://world.episerver.com/documentation/developer-guides/CMS/user-interface/Extending-the-navigation/

About the Author

Adnan Zameer, Lead Developer at Optimizley UK, is a certified Microsoft professional, specializing in web app architecture. His expertise includes Optimizley CMS and Azure, showcasing proficiency in crafting robust and efficient solutions.

0 comments :

Post a Comment