public override string[] GetRolesForUser(string username)
 {
     var rep = new MusicRepository();
     User user = rep.AllUsers.First(u => u.Name == username);
     if (user.Role == "Admin")
     {
         return new[] { "Admin", "User" };
     }
     else
     {
         return new[] { "User" };
     }
 }
 public override bool ValidateUser(string username, string password)
 {
     var repository = new MusicRepository();
     if (string.IsNullOrEmpty(password.Trim()))
     {
         return false;
     }
     User user = repository.FindUserByName(username);
     if (user == null)
     {
         return false;
     }
     if (user.Password == FormsAuthentication.HashPasswordForStoringInConfigFile(password, "SHA1"))
     {
         return true;
     }
     else
     {
         return false;
     }
 }