From 9b202d103ad6d7080a0c7b61b04498d040243ede Mon Sep 17 00:00:00 2001 From: Jacob O'Mara Date: Thu, 10 Apr 2025 12:30:24 +0100 Subject: [PATCH] Bug 40824: Add "password has been used before" exception --- Koha/Exceptions/Password.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Koha/Exceptions/Password.pm b/Koha/Exceptions/Password.pm index 99568a37030..ccfaba59d3c 100644 --- a/Koha/Exceptions/Password.pm +++ b/Koha/Exceptions/Password.pm @@ -48,7 +48,10 @@ use Exception::Class ( 'Koha::Exceptions::Password::NoCategoryProvided' => { isa => 'Koha::Exceptions::Password', description => 'You must provide a patron\'s category to validate password\'s strength and length' - } + }, + 'Koha::Exceptions::Password::UsedBefore' => { + isa => 'Koha::Exceptions::Password', + }, ); sub full_message { @@ -91,6 +94,10 @@ Password is too weak. Password contains leading/trailing spaces, which is forbidden. +=head2 Koha::Exceptions::Password::UsedBefore + +Exception to be used when a password has been used before and is not allowed by password history policy. + =head1 Class methods =head2 full_message -- 2.39.5