From 69d88cc5a8cf07971163b21bf6e1460110d88356 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 19 Mar 2021 12:05:24 -0300 Subject: [PATCH] Bug 23666: (QA follow-up) Fix wrong required permissions Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize --- api/v1/swagger/paths/patrons_extended_attributes.json | 2 +- t/db_dependent/api/v1/patrons_extended_attributes.t | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/v1/swagger/paths/patrons_extended_attributes.json b/api/v1/swagger/paths/patrons_extended_attributes.json index 048bae827b..c721f409c3 100644 --- a/api/v1/swagger/paths/patrons_extended_attributes.json +++ b/api/v1/swagger/paths/patrons_extended_attributes.json @@ -79,7 +79,7 @@ }, "x-koha-authorization": { "permissions": { - "catalogue": "1" + "borrowers": "edit_borrowers" } } }, diff --git a/t/db_dependent/api/v1/patrons_extended_attributes.t b/t/db_dependent/api/v1/patrons_extended_attributes.t index 3ee17affa8..da80c2e23e 100755 --- a/t/db_dependent/api/v1/patrons_extended_attributes.t +++ b/t/db_dependent/api/v1/patrons_extended_attributes.t @@ -40,7 +40,7 @@ subtest 'list_patron_attributes() tests' => sub { my $patron = $builder->build_object({ class => 'Koha::Patrons', - value => { flags => 2 ** 2 } # 'catalogue' flag == 2 + value => { flags => 2 ** 4 } # 'borrowers' flag == 4 }); my $password = 'thePassword123'; $patron->set_password({ password => $password, skip_validation => 1 }); @@ -208,8 +208,8 @@ subtest 'overwrite() tests' => sub { my $patron = $builder->build_object({ class => 'Koha::Patrons', - value => { flags => 2 ** 4 + 2 ** 2 } # 'borrowers' flag == 4 - }); # 'catalogue' flag == 2 + value => { flags => 2 ** 4 } # 'borrowers' flag == 4 + }); my $password = 'thePassword123'; $patron->set_password({ password => $password, skip_validation => 1 }); my $userid = $patron->userid; -- 2.20.1