Exemplo n.º 1
0
 public override bool DeleteRole(string roleName, bool throwOnPopulatedRole)
 {
     var repository = new SecurityRepository();
     var role = repository.GetRole(roleName);
     if (role == null)
         throw new ProviderException("Specified role not found");
     if (!throwOnPopulatedRole)
     {
         if (role.User2Roles.Count() > 0)
             throw new ProviderException("Role is populated");
     }
     repository.DeleteRole(role);
     return true;
 }