[Koha-patches] [PATCH][HEAD] (bug #3284) fix borrower deletion in independantbranches mode
Joe Atzberger
joe.atzberger at liblime.com
Fri Jun 26 05:31:41 CEST 2009
Please somebody correct me if I am wrong, but I think the interpretation of
the {flags} field is as follows:
- unless ($userenv->{flags} % 2 == 1){
%2 is modulus operator. This check is the same as "is it an odd number?"
and because of the way {flags} is built, it means "is user a
superlibrarian?" because the superlibrarian flag is the lowest "bit".
> + if ($userenv->{flags} != 1 && $bor->{'branchcode'}){
>
This check for flags asks "is user ONLY the superlibrarian". That is, it
would block a superlibrarian with any other additional flags set. That is
the wrong security model.
Also, $userenv was already declared at line 51 so it should not be
redeclared here.
--
Joe Atzberger
LibLime - Open Source Library Solutions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-patches/attachments/20090625/12e5c04e/attachment-0002.htm>
More information about the Koha-patches
mailing list