Пример #1
0
 public static bool HasFoundDeviceBelongsToPerson(this UserChangePasswordCommand command, Device device, Person person)
 {
     return(command.HasFoundDevice(device) &&
            command.HasFoundPerson(person) &&
            AssertionConcern.IsSatisfiedBy(AssertionConcern.AssertAreEquals(device.Person.PersonId.ToString(), person.PersonId.ToString(),
                                                                            Resources.Messages.UserChangePasswordDeviceDoesNotBelongToUser)));
 }
Пример #2
0
 public static bool HasSerialKey(this UserChangePasswordCommand command)
 {
     return(AssertionConcern.IsSatisfiedBy(AssertionConcern.AssertNotNull(command.SerialKey, Resources.Messages.SerialKeyRequired)));
 }
Пример #3
0
 public static bool HasActiveUser(this UserChangePasswordCommand authenticateUserCommand, Person person)
 {
     return(AssertionConcern.IsSatisfiedBy(AssertionConcern.AssertTrue(person != null && person.PersonUserStatus == PersonUserStatus.Active, Resources.Messages.UserAuthenticateUserIsInactive)));
 }
Пример #4
0
 public static bool HasFoundAuthorizedUser(this UserChangePasswordCommand authenticateUserCommand, Person person)
 {
     return(AssertionConcern.IsSatisfiedBy(AssertionConcern.AssertNotNull(person, Resources.Messages.UserAuthenticateLoginFailed)));
 }
Пример #5
0
 public static bool HasFoundDevice(this UserChangePasswordCommand command, Device device)
 {
     return(AssertionConcern.IsSatisfiedBy(AssertionConcern.AssertNotNull(device, Resources.Messages.UserChangePasswordDeviceNotFound)));
 }
Пример #6
0
 public static bool HasFoundPerson(this UserChangePasswordCommand command, Person person)
 {
     return(AssertionConcern.IsSatisfiedBy(AssertionConcern.AssertNotNull(person, Resources.Messages.UserNotFound)));
 }