Temporarily disable account freezing on contention
This commit is contained in:
parent
1d1e3ba79d
commit
a01f96e0e4
|
@ -819,7 +819,7 @@ public class AccountController {
|
||||||
// Freezing the existing account credentials will definitively start the reglock timeout.
|
// Freezing the existing account credentials will definitively start the reglock timeout.
|
||||||
// Until the timeout, the current reglock can still be supplied,
|
// Until the timeout, the current reglock can still be supplied,
|
||||||
// along with phone number verification, to restore access.
|
// along with phone number verification, to restore access.
|
||||||
boolean alreadyLocked = existingAccount.hasLockedCredentials();
|
/* boolean alreadyLocked = existingAccount.hasLockedCredentials();
|
||||||
Metrics.counter(LOCKED_ACCOUNT_COUNTER_NAME,
|
Metrics.counter(LOCKED_ACCOUNT_COUNTER_NAME,
|
||||||
LOCK_REASON_TAG_NAME, "verifiedNumberFailedReglock",
|
LOCK_REASON_TAG_NAME, "verifiedNumberFailedReglock",
|
||||||
ALREADY_LOCKED_TAG_NAME, Boolean.toString(alreadyLocked))
|
ALREADY_LOCKED_TAG_NAME, Boolean.toString(alreadyLocked))
|
||||||
|
@ -833,7 +833,7 @@ public class AccountController {
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Long> deviceIds = updatedAccount.getDevices().stream().map(Device::getId).toList();
|
List<Long> deviceIds = updatedAccount.getDevices().stream().map(Device::getId).toList();
|
||||||
clientPresenceManager.disconnectAllPresences(updatedAccount.getUuid(), deviceIds);
|
clientPresenceManager.disconnectAllPresences(updatedAccount.getUuid(), deviceIds); */
|
||||||
|
|
||||||
throw new WebApplicationException(Response.status(423)
|
throw new WebApplicationException(Response.status(423)
|
||||||
.entity(new RegistrationLockFailure(existingRegistrationLock.getTimeRemaining(),
|
.entity(new RegistrationLockFailure(existingRegistrationLock.getTimeRemaining(),
|
||||||
|
|
|
@ -1068,8 +1068,8 @@ class AccountControllerTest {
|
||||||
|
|
||||||
assertThat(response.getStatus()).isEqualTo(423);
|
assertThat(response.getStatus()).isEqualTo(423);
|
||||||
|
|
||||||
verify(senderRegLockAccount).lockAuthenticationCredentials();
|
// verify(senderRegLockAccount).lockAuthenticationCredentials();
|
||||||
verify(clientPresenceManager, times(1)).disconnectAllPresences(eq(SENDER_REG_LOCK_UUID), any());
|
// verify(clientPresenceManager, times(1)).disconnectAllPresences(eq(SENDER_REG_LOCK_UUID), any());
|
||||||
verify(pinLimiter).validate(eq(SENDER_REG_LOCK));
|
verify(pinLimiter).validate(eq(SENDER_REG_LOCK));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1092,8 +1092,8 @@ class AccountControllerTest {
|
||||||
assertThat(failure.getBackupCredentials().getPassword().startsWith(SENDER_REG_LOCK_UUID.toString())).isTrue();
|
assertThat(failure.getBackupCredentials().getPassword().startsWith(SENDER_REG_LOCK_UUID.toString())).isTrue();
|
||||||
assertThat(failure.getTimeRemaining()).isGreaterThan(0);
|
assertThat(failure.getTimeRemaining()).isGreaterThan(0);
|
||||||
|
|
||||||
verify(senderRegLockAccount).lockAuthenticationCredentials();
|
// verify(senderRegLockAccount).lockAuthenticationCredentials();
|
||||||
verify(clientPresenceManager, atLeastOnce()).disconnectAllPresences(eq(SENDER_REG_LOCK_UUID), any());
|
// verify(clientPresenceManager, atLeastOnce()).disconnectAllPresences(eq(SENDER_REG_LOCK_UUID), any());
|
||||||
verifyNoInteractions(pinLimiter);
|
verifyNoInteractions(pinLimiter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1338,8 +1338,8 @@ class AccountControllerTest {
|
||||||
|
|
||||||
assertThat(response.getStatus()).isEqualTo(423);
|
assertThat(response.getStatus()).isEqualTo(423);
|
||||||
|
|
||||||
verify(existingAccount).lockAuthenticationCredentials();
|
// verify(existingAccount).lockAuthenticationCredentials();
|
||||||
verify(clientPresenceManager, atLeastOnce()).disconnectAllPresences(eq(existingUuid), any());
|
// verify(clientPresenceManager, atLeastOnce()).disconnectAllPresences(eq(existingUuid), any());
|
||||||
verify(changeNumberManager, never()).changeNumber(any(), any(), any(), any(), any(), any());
|
verify(changeNumberManager, never()).changeNumber(any(), any(), any(), any(), any(), any());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1378,8 +1378,8 @@ class AccountControllerTest {
|
||||||
|
|
||||||
assertThat(response.getStatus()).isEqualTo(423);
|
assertThat(response.getStatus()).isEqualTo(423);
|
||||||
|
|
||||||
verify(existingAccount).lockAuthenticationCredentials();
|
// verify(existingAccount).lockAuthenticationCredentials();
|
||||||
verify(clientPresenceManager, atLeastOnce()).disconnectAllPresences(eq(existingUuid), any());
|
// verify(clientPresenceManager, atLeastOnce()).disconnectAllPresences(eq(existingUuid), any());
|
||||||
verify(changeNumberManager, never()).changeNumber(any(), any(), any(), any(), any(), any());
|
verify(changeNumberManager, never()).changeNumber(any(), any(), any(), any(), any(), any());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue