DotNetNuke (DNN) is a web application Open Source Platform and has grown in popularity over the years because it does a very good job of solving the problem of basic web solution. In this article, I am going to explain how we can create custom role and assign roles to the user.

Using "Roles" is one of the greatest features in DotNetNuke (DNN). Based on that, we can give rights to user to view pages, View Modules, access menus, etc. Roles can be customizable. We can restrict a user to view some page or some part of a Page based on the role only. Let's see how we can assign a role to a newly created user.

1.  Click on Edit (Pencil) icon for that user to whom we want to add a Role. Let's say I clicked on Edit icon of user "Abhijit Jana".

2. Click on "Manage Roles for this User" Link. This will redirect you to Create and Assign Role Page.

Here we can select the Roles for user. One user can have multiple Roles. We can give theeffective and Expiry date for roles too. Just Select Role from "Security Role" Dropdown and Select date if needed then click on the "Add Role to User" Link. This means selected role is now given to that user. We can also remove the added role in a similar way by clicking on Delete (Cross) Icon.

Creating new roles are very simple. Follow steps bellow:

1. From Admin Menu Clicks on "Security Roles" Link. This will open a new page with the list of all existing Roles.

2. Click on Down Arrow Icon with Security Roles (Lock Icon), and select "Add New Role" as shown in the picture given below, I am going to create a new Role:

3. Here we need to give the Role Name and Description with other details. Then we need to click on the Update button to save the Role:

5. On update, "Sales Team" roles will be added with the list of Roles. We can use the Edit (Pencil) Icon to Edit the Role.

I have already discussed how to assign a role to a user. We need to flow the same steps. Below are the sample screen shots where I am assigning the newly created "Sales Team" Role to a user.

Hope it will be helpful for those who are starting with DNN.