]> 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)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 30 Dec 2013 15:47:23 +0000 (15:47 +0000)
commitfb4025b67b45e60154f67b9acca3d56e4f5eb7c5
tree76eec29e4b1f45210179094f0941a01f3396e984
parent4a0f630f7f8c7f3c402defa5837bc470510ebb07
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>
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