---
title:        "Working with roles and permissions"
description:  "Every now and then we are given the challenge to create custom roles specific to clients needs. In this post I would like to share with you how I typically handle the role creation and configuration of the permissions."
url:          https://www.jeroenfurst.nl/blog/working-with-roles-and-permissions
date:         2015-09-26
category:     Security and permissions
tags:         [Security and permissions]
reading_time: 1
---

# Working with roles and permissions

> Every now and then we are given the challenge to create custom roles specific to clients needs. In this post I would like to share with you how I typically handle the role creation and configuration of the permissions.

First of all let's start with creating a new role.
 
 ![Create the role](~/getContentAsset/631810fb-5303-4980-ad89-7645a37ead2a/310c1ea5-13ca-4d75-95a0-620f51989b44/786db8e7_new_role.PNG.PNG)
 For more details on role management check out the Kentico [documentation](https://docs.kentico.com/display/K82/Role+management).
 Next up assign a user to the role.
 
 ![Assign user to the role](~/getContentAsset/79df3b3a-e8d9-4280-8ab5-dabd157cc338/310c1ea5-13ca-4d75-95a0-620f51989b44/assign_user.PNG.PNG)
 
 Assuming the user has editorial access we can now use his or hers account to login and experience what he or she can actually access in the administration section. 
 
 *Tip: you can easily impersonate the user from the top right section or within the user management module (if you have permissions to do so).*
 
 Notice that the account does not have access to the resource 'CMS' and misses permissions for UI element 'Administration'.
 
 ![Access denied to resource](~/getContentAsset/50b4cada-520d-4a02-944a-28dad5ae9b05/310c1ea5-13ca-4d75-95a0-620f51989b44/7f38093a_ui_permission.PNG.PNG)
 This is actually what I want, as I prefer to start without any permissions and build it up along the way. Let's apply some UI personalization. You might be prompted to enable the "Enable UI personalization" setting.
 
 ![Enable UI personalization](~/getContentAsset/e1bec6a0-e20a-463b-9699-7e74b6133cb2/310c1ea5-13ca-4d75-95a0-620f51989b44/91924954_enable_ui_settings.PNG.PNG)
 Tick the CMS and Administration boxes as illustrated in the below image.
 
 ![Basic UI personalization settings](~/getContentAsset/159fc76c-42d0-4c4e-897c-9f3c64113add/310c1ea5-13ca-4d75-95a0-620f51989b44/basic_ui_permission_to_access_admin_section.PNG.PNG)
 
 The user will now have access to the administration section. Notice that no single module is available.
 
 ![Empty dashboard](~/getContentAsset/d10fc1c1-098e-45e0-806f-ac244c980f49/310c1ea5-13ca-4d75-95a0-620f51989b44/af17bb36_empty_dashboard.PNG.PNG)
 
 Let's add for example the form module. Tick the "Content management" box followed by "Forms'.
 
 *Tip: You can easily select/deselect all child elements using the "select all" and "clear all" links.*
 
 ![Enable UI personalization for Forms module](~/getContentAsset/d787826c-98a7-487b-8b81-d2892ce99b0b/310c1ea5-13ca-4d75-95a0-620f51989b44/4c88e27a_enable_ui_for_module.PNG.PNG)
 
 This however is not enough. The UI personalization only controls what the user can see. We will also need to specify actual permissions to access the forms module. Click on the permissions tab and grant permissions to read the forms module.
 
 ![Setup permissions](~/getContentAsset/ac4511cd-e2a4-48dd-831a-fad4da84f884/310c1ea5-13ca-4d75-95a0-620f51989b44/6be9e17a_setup_permissions.PNG.PNG)
 
 Once the user refreshes the page, he or she will be able to access the forms module.
 
 ![Access granted to the module](~/getContentAsset/0efd07eb-5f51-4005-b23d-a5ef78081dee/310c1ea5-13ca-4d75-95a0-620f51989b44/access_granted_to_module.PNG.PNG)
 Notice that the "New form" button is disabled because we did not enable the "Create form" permission. This is actually pretty neat as you have a lot of control over what the user can access.
 
 One final cool thing is to add the forms module as tile to the default dashboard of the user. Open the "Default dashboard" tab and add the forms module.
 
 ![Update default dashboard](~/getContentAsset/68ddf712-9220-4e3f-a3a1-ab4ed6b6687d/310c1ea5-13ca-4d75-95a0-620f51989b44/e7a68120_update_default_dashboard.PNG.PNG)
 
 The user will now see the forms module in the dashboard.
 
 ![Updated dashboard](~/getContentAsset/a3b30520-a382-4f9d-b6a8-d6180cf0ee0c/310c1ea5-13ca-4d75-95a0-620f51989b44/01011562_default_dashboard_updated.PNG.PNG)
 
 *Tip: check out [security debugging](https://docs.kentico.com/display/K82/Event+log+and+security+debug) if you are having trouble finding the right permission or UI personalization setting.*