BlogEngine.Core.Providers.XmlRoleProvider.CreateRole C# (CSharp) Method

CreateRole() public method

Adds a new role to the data source for the configured applicationName.
public CreateRole ( string roleName ) : void
roleName string /// The name of the role to create. ///
return void
        public override void CreateRole(string roleName)
        {
            ReadRoleDataStore();

            // This needs to be fixed. This will always return false.
            if (this.roles[Blog.CurrentInstance.Id].Contains(new Role(roleName)))
            {
                return;
            }

            this.roles[Blog.CurrentInstance.Id].Add(new Role(roleName));
            this.Save();
        }