Resolved various failing tests.

This commit is contained in:
Andy Butland
2020-08-25 12:30:43 +02:00
parent b4e01392d9
commit 8241643183
44 changed files with 234 additions and 207 deletions

View File

@@ -33,6 +33,7 @@ namespace Umbraco.Web.Models.ContentEditing
if (UserGroups.Any() == false)
yield return new ValidationResult("A user must be assigned to at least one group", new[] { nameof(UserGroups) });
// TODO: this will need another way of retrieving this setting if and when Configs are removed from Current.
if (Current.Configs.Security().UsernameIsEmail == false && Username.IsNullOrWhiteSpace())
yield return new ValidationResult("A username cannot be empty", new[] { nameof(Username) });
}