This project is read-only.

Add user role (4th)

May 31, 2008 at 10:39 PM
Edited May 31, 2008 at 10:54 PM
I know we can make an user became power user with the user management.
But I want to add another role, like "moderator".
I tried to make it working, for the version 1.2.1, and works because can save the role in the xml file. It can do everything, show in the navigation menu and others.
I want only to do works " Editable by Moderator".

// I want to apoligize for my English, I'm Italian guy of 14 years old :P


Ok, I make it working :-)

The only think I forgot was to add the pageProperties in the provider PowerUserExt.cs
I added this in about line 40:

            else if (user.IsInRole(RoleNames.Moderator.ToString())) {
                return pageProperties != null && pageProperties.Moderator;

Remember that if you want to add other roles, you must adjust the providers, WebSite.cs or WebPage.cs and Enumeration.cs (with the name of the role)