]> git.koha-community.org Git - koha.git/commit
Bug 10277 - Add C4::Context->IsSuperLibrarian()
authorKyle M Hall <kyle@bywatersolutions.com>
Wed, 15 May 2013 15:04:07 +0000 (11:04 -0400)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 7 Aug 2014 07:36:50 +0000 (09:36 +0200)
commitd003bfa37cc2dade07c5e18f2ef13ff27ce6aba8
tree94bb4469e7e2cced4b28e71eaa0a68352961feeb
parent3e738bc4818141a6f815b81b8f73c0394522f0aa
Bug 10277 - Add C4::Context->IsSuperLibrarian()

The method of checking the logged in user for superlibrarian privileges
is obtuse ( $userenv && $userenv->{flags} % 2 != 1 ) to say the least.
The codebase is littered with these lines, with no explanation given. It
would be much better if we had one subroutine that returned a boolean
value to tell us if the logged in user is a superlibrarian or not.

Test Plan:
1) Apply this patch
2) Verify superlibrarian behavior remains unchanged

Signed-off-by: Joel Sasse <jsasse@plumcreeklibrary.net>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comments on second patch.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit fb4025b67b45e60154f67b9acca3d56e4f5eb7c5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
23 files changed:
C4/Acquisition.pm
C4/Branch.pm
C4/Circulation.pm
C4/Context.pm
C4/Items.pm
C4/Members.pm
C4/Serials.pm
C4/Suggestions.pm
acqui/basket.pl
acqui/neworderempty.pl
cataloguing/addbiblio.pl
cataloguing/additem.pl
circ/overdue.pl
circ/ysearch.pl
members/deletemem.pl
members/memberentry.pl
members/moremember.pl
reserve/request.pl
serials/member-search.pl
serials/subscription-add.pl
suggestion/suggestion.pl
tools/export.pl
tools/holidays.pl