]> git.koha-community.org Git - koha.git/commit
Bug 14868: (QA followup) Change permission check order
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 31 Aug 2016 23:11:05 +0000 (20:11 -0300)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 2 Sep 2016 12:20:36 +0000 (12:20 +0000)
commit1fc17eacc5418a3dcde25aa45d82adb825034fad
tree306e6456da30ce1674c3809576919af5b7ae6c60
parent985265c0be182342374f50d95493ec3d50bdd5e0
Bug 14868: (QA followup) Change permission check order

This patch changes the permission check order because haspermission
is the smaller check, and going through the patron/user and its guaranteed
before checking if it is (say) a staff member or even a superlibrarian doesn't
seem right.

Bonus: Remove unneeded C4::Auth import in Patron.pm

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/REST/V1.pm
Koha/REST/V1/Patron.pm