Added roles (may or may not be used)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using AipsCore.Domain.Abstract.Validation;
|
||||
using AipsCore.Domain.Common.Validation;
|
||||
using AipsCore.Domain.Models.User.External;
|
||||
using AipsCore.Domain.Models.User.ValueObjects;
|
||||
|
||||
namespace AipsCore.Domain.Models.User.Validation;
|
||||
@@ -21,4 +22,12 @@ public class UserErrors : AbstractErrors<User, UserId>
|
||||
|
||||
return CreateValidationError(code, message);
|
||||
}
|
||||
|
||||
public static ValidationError RoleDoesNotExist(string name)
|
||||
{
|
||||
string code = "user_role_does_not_exist";
|
||||
string message = $"Role '{name}' does not exist";
|
||||
|
||||
return CreateValidationError(code, message);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user