Bugzilla – Attachment 169237 Details for
Bug 29509
GET /patrons* routes permissions excessive
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29509: (QA follow-up) Tidy atomic update
Bug-29509-QA-follow-up-Tidy-atomic-update.patch (text/plain), 4.36 KB, created by
Kyle M Hall (khall)
on 2024-07-19 14:50:23 UTC
(
hide
)
Description:
Bug 29509: (QA follow-up) Tidy atomic update
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2024-07-19 14:50:23 UTC
Size:
4.36 KB
patch
obsolete
>From 693efa913544eea4c4a2e57a5db26425a6268246 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 19 Jul 2024 09:54:44 -0400 >Subject: [PATCH] Bug 29509: (QA follow-up) Tidy atomic update > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../data/mysql/atomicupdate/bug_29509.pl | 20 +++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_29509.pl b/installer/data/mysql/atomicupdate/bug_29509.pl >index 3a0799256aa..b70fd3ce6bd 100755 >--- a/installer/data/mysql/atomicupdate/bug_29509.pl >+++ b/installer/data/mysql/atomicupdate/bug_29509.pl >@@ -30,10 +30,10 @@ return { > my $sth3 = $dbh->prepare("SELECT borrowernumber FROM user_permissions WHERE code = 'manage_bookings'"); > $sth3->execute(); > my @manage_bookings = map { $_->[0] } @{ $sth3->fetchall_arrayref }; >- my $sth3_1 = $dbh->prepare("SELECT borrowernumber FROM borrowers WHERE flags & (1<<1)"); >+ my $sth3_1 = $dbh->prepare("SELECT borrowernumber FROM borrowers WHERE flags & (1<<1)"); > $sth3_1->execute(); > my @circulate = map { $_->[0] } @{ $sth3_1->fetchall_arrayref }; >- my @bookings = (@manage_bookings, @circulate); >+ my @bookings = ( @manage_bookings, @circulate ); > @rows_to_insert = ( map { [ $_, 4, "list_borrowers" ] } array_minus( @bookings, @exclusions ) ); > foreach my $row (@rows_to_insert) { $insert_sth->execute( @{$row} ); } > say $out "list_borrowers added to all users with manage_bookings"; >@@ -42,10 +42,10 @@ return { > my $sth4 = $dbh->prepare("SELECT borrowernumber FROM user_permissions WHERE code = 'label_creator'"); > $sth4->execute(); > my @label_creator = map { $_->[0] } @{ $sth4->fetchall_arrayref }; >- my $sth4_1 = $dbh->prepare("SELECT borrowernumber FROM borrowers WHERE flags & (1<<13)"); >+ my $sth4_1 = $dbh->prepare("SELECT borrowernumber FROM borrowers WHERE flags & (1<<13)"); > $sth4_1->execute(); >- my @tools = map { $_->[0] } @{ $sth4_1->fetchall_arrayref }; >- my @labels = (@label_creator, @tools); >+ my @tools = map { $_->[0] } @{ $sth4_1->fetchall_arrayref }; >+ my @labels = ( @label_creator, @tools ); > @rows_to_insert = ( map { [ $_, 4, "list_borrowers" ] } array_minus( @labels, @exclusions ) ); > foreach my $row (@rows_to_insert) { $insert_sth->execute( @{$row} ); } > say $out "list_borrowers added to all users with label_creator"; >@@ -54,10 +54,10 @@ return { > my $sth5 = $dbh->prepare("SELECT borrowernumber FROM user_permissions WHERE code = 'routing'"); > $sth5->execute(); > my @routing = map { $_->[0] } @{ $sth5->fetchall_arrayref }; >- my $sth5_1 = $dbh->prepare("SELECT borrowernumber FROM borrowers WHERE flags & (1<<15)"); >+ my $sth5_1 = $dbh->prepare("SELECT borrowernumber FROM borrowers WHERE flags & (1<<15)"); > $sth5_1->execute(); >- my @serials = map { $_->[0] } @{ $sth5_1->fetchall_arrayref }; >- my @routing_lists = (@routing, @serials); >+ my @serials = map { $_->[0] } @{ $sth5_1->fetchall_arrayref }; >+ my @routing_lists = ( @routing, @serials ); > @rows_to_insert = ( map { [ $_, 4, "list_borrowers" ] } array_minus( @routing_lists, @exclusions ) ); > foreach my $row (@rows_to_insert) { $insert_sth->execute( @{$row} ); } > say $out "list_borrowers added to all users with routing"; >@@ -66,10 +66,10 @@ return { > my $sth6 = $dbh->prepare("SELECT borrowernumber FROM user_permissions WHERE code = 'order_manage'"); > $sth6->execute(); > my @order_manage = map { $_->[0] } @{ $sth6->fetchall_arrayref }; >- my $sth6_1 = $dbh->prepare("SELECT borrowernumber FROM borrowers WHERE flags & (1<<11)"); >+ my $sth6_1 = $dbh->prepare("SELECT borrowernumber FROM borrowers WHERE flags & (1<<11)"); > $sth6_1->execute(); > my @acquisitions = map { $_->[0] } @{ $sth6_1->fetchall_arrayref }; >- my @orders = (@order_manage, @acquisitions); >+ my @orders = ( @order_manage, @acquisitions ); > @rows_to_insert = ( map { [ $_, 4, "list_borrowers" ] } array_minus( @orders, @exclusions ) ); > foreach my $row (@rows_to_insert) { $insert_sth->execute( @{$row} ); } > say $out "list_borrowers added to all users with order_manage"; >-- >2.30.2
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 29509
:
161256
|
161268
|
161269
|
161270
|
161271
|
162579
|
162580
|
162690
|
162691
|
164461
|
166280
|
169235
|
169236
| 169237