Bugzilla – Attachment 106925 Details for
Bug 15522
New interface for revamped circulation rules
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15522: (follow-up) Fix 400 errors in circ_rules.t
Bug-15522-follow-up-Fix-400-errors-in-circrulest.patch (text/plain), 1.73 KB, created by
Martin Renvoize (ashimema)
on 2020-07-15 11:12:31 UTC
(
hide
)
Description:
Bug 15522: (follow-up) Fix 400 errors in circ_rules.t
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-07-15 11:12:31 UTC
Size:
1.73 KB
patch
obsolete
>From 25d903d27e187330b335e3e13f33862e60d5744d Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@hypernova.fi> >Date: Fri, 27 Mar 2020 02:27:41 +0000 >Subject: [PATCH] Bug 15522: (follow-up) Fix 400 errors in circ_rules.t > >Commit "Bug 15522: Fix permission name manage_circ_rules_from_any_libraries" >renames a permission by one that negates the previous. > >However the commit above incorrectly negates more than is supposed to. > >The test wants to check whether unauthorized and restricted user can store >circulation rules. > >The libriarian is restricted (to their homebranch) when they are circ rules >authorized (by "manage_circ_rules" permission) but do not have permission >"manage_circ_rules_from_any_libraries". > >To test: >1. prove t/db_dependent/api/v1/circ_rules.t >--- > t/db_dependent/api/v1/circ_rules.t | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/api/v1/circ_rules.t b/t/db_dependent/api/v1/circ_rules.t >index 47b5317f44..24bbb3cd72 100644 >--- a/t/db_dependent/api/v1/circ_rules.t >+++ b/t/db_dependent/api/v1/circ_rules.t >@@ -253,11 +253,13 @@ sub create_user_and_session { > $session->param( 'lasttime', time() ); > $session->flush; > >- if ( $args->{permissions} ne 'authorized_restricted' ) { >+ # Allow circulation rules management for librarian's home library, but not >+ # other libraries >+ if ( $args->{permissions} eq 'authorized_restricted' ) { > $dbh->do( > q{ > INSERT INTO user_permissions (borrowernumber,module_bit,code) >- VALUES (?,3,'manage_circ_rules_from_any_libraries'), (?,3,'manage_circ_rules')}, >+ VALUES (?,3,'manage_circ_rules')}, > undef, $user->{borrowernumber}, $user->{borrowernumber} > ); > } >-- >2.20.1
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 15522
:
68231
|
68232
|
68233
|
68234
|
68235
|
71048
|
71049
|
71050
|
71051
|
71052
|
72239
|
72242
|
91977
|
91978
|
91979
|
91980
|
91981
|
91982
|
91983
|
91984
|
94201
|
94202
|
94203
|
94204
|
94205
|
94206
|
94207
|
94208
|
99148
|
99149
|
99150
|
99151
|
99152
|
99153
|
99154
|
99155
|
99156
|
99157
|
99199
|
99200
|
99201
|
99202
|
99203
|
99204
|
99205
|
99206
|
99207
|
99208
|
99209
|
99210
|
99211
|
99213
|
99214
|
99215
|
101918
|
101919
|
101920
|
101921
|
101922
|
101923
|
101924
|
101925
|
101926
|
101927
|
101934
|
101935
|
101936
|
101937
|
101938
|
101939
|
101940
|
101941
|
101942
|
101943
|
101944
|
101945
|
101946
|
101947
|
106913
|
106914
|
106915
|
106916
|
106917
|
106918
|
106919
|
106920
|
106921
|
106922
|
106923
|
106924
| 106925 |
106926
|
112056
|
112057
|
112058
|
112059
|
112060
|
112061