Bugzilla – Attachment 186527 Details for
Bug 40824
Add option to prevent re-use of passwords
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40824: DBIC - DO NOT PUSH
Bug-40824-DBIC---DO-NOT-PUSH.patch (text/plain), 5.14 KB, created by
Jacob O'Mara
on 2025-09-17 09:48:08 UTC
(
hide
)
Description:
Bug 40824: DBIC - DO NOT PUSH
Filename:
MIME Type:
Creator:
Jacob O'Mara
Created:
2025-09-17 09:48:08 UTC
Size:
5.14 KB
patch
obsolete
>From 12ff0c42badf6c3a1f1f4d156d5a0fb941c792ef Mon Sep 17 00:00:00 2001 >From: Jacob O'Mara <jacob.omara@openfifth.co.uk> >Date: Wed, 17 Sep 2025 10:17:38 +0100 >Subject: [PATCH] Bug 40824: DBIC - DO NOT PUSH > >--- > Koha/Schema/Result/Borrower.pm | 19 +++- > Koha/Schema/Result/BorrowerPasswordHistory.pm | 104 ++++++++++++++++++ > Koha/Schema/Result/Category.pm | 13 ++- > 3 files changed, 132 insertions(+), 4 deletions(-) > create mode 100644 Koha/Schema/Result/BorrowerPasswordHistory.pm > >diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm >index 1e1fa11cd42..ee1b8058c77 100644 >--- a/Koha/Schema/Result/Borrower.pm >+++ b/Koha/Schema/Result/Borrower.pm >@@ -1151,6 +1151,21 @@ __PACKAGE__->has_many( > { cascade_copy => 0, cascade_delete => 0 }, > ); > >+=head2 borrower_password_histories >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::BorrowerPasswordHistory> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "borrower_password_histories", >+ "Koha::Schema::Result::BorrowerPasswordHistory", >+ { "foreign.borrowernumber" => "self.borrowernumber" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ > =head2 borrower_relationships_guarantees > > Type: has_many >@@ -2197,8 +2212,8 @@ Composing rels: L</user_permissions> -> permission > __PACKAGE__->many_to_many("permissions", "user_permissions", "permission"); > > >-# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-07-10 07:11:31 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:XFOe2X4k2DUziaNS5pWd/Q >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-09-17 09:14:33 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RQvOJOjtD9E4Q6QEkLWlCA > > __PACKAGE__->belongs_to( > "library", >diff --git a/Koha/Schema/Result/BorrowerPasswordHistory.pm b/Koha/Schema/Result/BorrowerPasswordHistory.pm >new file mode 100644 >index 00000000000..dd778ef19fa >--- /dev/null >+++ b/Koha/Schema/Result/BorrowerPasswordHistory.pm >@@ -0,0 +1,104 @@ >+use utf8; >+package Koha::Schema::Result::BorrowerPasswordHistory; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::BorrowerPasswordHistory >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<borrower_password_history> >+ >+=cut >+ >+__PACKAGE__->table("borrower_password_history"); >+ >+=head1 ACCESSORS >+ >+=head2 id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+=head2 borrowernumber >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 0 >+ >+=head2 password >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 128 >+ >+=head2 created_on >+ >+ data_type: 'timestamp' >+ datetime_undef_if_invalid: 1 >+ default_value: current_timestamp >+ is_nullable: 0 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "borrowernumber", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, >+ "password", >+ { data_type => "varchar", is_nullable => 0, size => 128 }, >+ "created_on", >+ { >+ data_type => "timestamp", >+ datetime_undef_if_invalid => 1, >+ default_value => \"current_timestamp", >+ is_nullable => 0, >+ }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("id"); >+ >+=head1 RELATIONS >+ >+=head2 borrowernumber >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::Borrower> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "borrowernumber", >+ "Koha::Schema::Result::Borrower", >+ { borrowernumber => "borrowernumber" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-09-17 09:14:33 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/qbG6KZnnD+JxaiXpTkdgg >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >diff --git a/Koha/Schema/Result/Category.pm b/Koha/Schema/Result/Category.pm >index 9cb9622295a..232772a2d36 100644 >--- a/Koha/Schema/Result/Category.pm >+++ b/Koha/Schema/Result/Category.pm >@@ -173,6 +173,13 @@ if patrons of this category can do the password reset flow, > > if patrons of this category can change their passwords in the OAPC > >+=head2 password_history_count >+ >+ data_type: 'smallint' >+ is_nullable: 1 >+ >+Number of previous passwords to check against when changing password for this patron type >+ > =head2 min_password_length > > data_type: 'smallint' >@@ -287,6 +294,8 @@ __PACKAGE__->add_columns( > { data_type => "tinyint", is_nullable => 1 }, > "change_password", > { data_type => "tinyint", is_nullable => 1 }, >+ "password_history_count", >+ { data_type => "smallint", is_nullable => 1 }, > "min_password_length", > { data_type => "smallint", is_nullable => 1 }, > "require_strong_password", >@@ -410,8 +419,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-07-10 07:11:31 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ADt+iDjteg9Jb81L2FMIvg >+# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-09-17 09:14:33 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SRkD2XmAHHpuJFnrftAXyA > > # You can replace this text with custom code or comments, and it will be preserved on regeneration > >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40824
:
186511
|
186512
|
186513
|
186514
|
186515
|
186516
|
186517
|
186518
|
186519
|
186520
|
186521
|
186522
|
186523
|
186524
|
186525
|
186526
| 186527