[Koha-devel] Blocking an account

paul POULAIN paul.poulain at free.fr
Thu Jun 5 02:29:02 CEST 2003


Cc to Chris, that is welcomed to confirm :-) (he's the best at 
circulation code for instance)

Jerome Vizcaino wrote:

>Hi
>
>What should I do ?
>Opinions are diverging... Who's right ?
>
The Truth is somewhere else :-D

>Thanks
>Jerome
>On Wed, 2003-06-04 at 16:47, Tonnesen Steve wrote:
>  
>
>>On Wed, 4 Jun 2003, paul POULAIN wrote:
>>    
>>
>>>ALL options in this page are related to librarian interface.
>>>That's in the user main page that I want to change the link name.
>>>The "patron" options seems to have been cleared by a stupid cut/paste, 
>>>they were somewhere else.
>>>The screen you refer to is ONLY for librarian.
>>>      
>>>
>>Paul:
>>
>>I think the problem is that none of those "flags" are functional yet.  The
>>_intention_ of the "Borrow books" flag is exactly what Jerome was looking
>>for.  If a patron does not have the "Borrow books" flag then a warning
>>_should_ get displayed when they try to borrow books.  However, at the
>>present time, this is not done.  Only the "superlibrarian" flag is used to
>>limit access to the librarian pages.
>>
>>Steve.
>>    
>>
We both are wrong imho.
the "borrow books" flag means "can this user enter the borrow-book part 
of Koha". Flags are tested when the template is called. If the user does 
not have the flag set, a nice "sorry koha think you can't access to this 
page". I don't agree it's not used. There are places where the checking 
is done on a wrong flag, but it's always done, as it's integrated in 
template opening.

How are we supposed to check a borrower can borrow a book ?
We look at borrower table, fields debarred, gonenoaddress and lost.
the check is in C4/Circulation/Cirec2.pm, line 611 :
        if ($patroninformation->{'gonenoaddress'}) {
            $rejected="Patron is gone, with no known address.";
            last SWITCH;
        }
        if ($patroninformation->{'lost'}) {
            $rejected="Patron's card has been reported lost.";
            last SWITCH;
        }
        if ($patroninformation->{'debarred'}) {
            $rejected="Patron is Debarred";
            last SWITCH;
        }
It seems there is a bug here.

-- 
Paul POULAIN
Consultant indépendant en logiciels libres
responsable francophone de koha (SIGB libre http://www.koha-fr.org)






More information about the Koha-devel mailing list