Skip to content

Commit fce31c8

Browse files
author
James Williams
authored
Change wording of password expiry warning (#202)
## What is the goal of this PR? We've changed the wording and logic of the password expiry warning to be more accurate. This brings us in line with our implementation in Studio: typedb/typedb-studio#722 ## What are the changes implemented in this PR? To avoid returning "[...] will expire in 0 hours.", we now return "[...] will expire within 1 hour(s)." This is accurate and less jarring for users.
1 parent 5399043 commit fce31c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

TypeDBConsole.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ private TypeDBClient createTypeDBClient(CLIOptions options) {
467467
Optional<Duration> passwordExpiry = client.asCluster().users().get(options.username)
468468
.passwordExpirySeconds().map(Duration::ofSeconds);
469469
if (passwordExpiry.isPresent() && passwordExpiry.get().compareTo(PASSWORD_EXPIRY_WARN) < 0) {
470-
printer.info("Your password will expire in " + passwordExpiry.get().toHours() + " hours.");
470+
printer.info("Your password will expire within " + (passwordExpiry.get().toHours() + 1) + " hour(s).");
471471
}
472472
} else {
473473
client = TypeDB.coreClient(TypeDB.DEFAULT_ADDRESS);

0 commit comments

Comments
 (0)