[Koha] How to copy patron permissions?

Michael Kuhn mik at adminkuhn.ch
Wed Apr 27 23:37:58 NZST 2022


Hi Katrin

You wrote:

 > this will work as long as you only assign 'module/top level
 > permissions.
 > As soon as you only assign some sub-permissions of a module to a user,
 > you'll also need the entries from the user_permissions table.

Thanks for this important hint! Yes, in this case it is not as easy as I 
described it. Unfortunately.

Best wishes: Michael
-- 
Geschäftsführer · Diplombibliothekar BBS, Informatiker eidg. Fachausweis
Admin Kuhn GmbH · Pappelstrasse 20 · 4123 Allschwil · Schweiz
T 0041 (0)61 261 55 61 · E mik at adminkuhn.ch · W www.adminkuhn.ch


> On 27.04.22 12:31, Michael Kuhn wrote:
>> Hi
>>
>> Thanks to all who answered my e-mail concerning patron permissions!
>> Raymund Delahunty, Owen Leonard, David Nind, Joel Coehoorn, Michael
>> Sutherland and Katrin Fischer!
>>
>> I have saved all the information you gave me for other uses cases. But
>> in our current library we are hesitating to use non-Koha-standard
>> methods like external Javascript or plugins. Since we don't need to
>> copy patron permissions very often we will wait until Koha implements
>> a proper way to copy patron permissions, e. g. according to
>> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30623
>>
>> For the cases when we actually need to copy patron permissions, for us
>> the following way seems to be the easiest (instead of manual "box
>> ticking") :
>>
>> 1. Find the cardnumber (here: 25) of a patron which has the desired
>> patron permissions, then search for the patron permissions of this
>> patron:
>>
>> SELECT flags FROM borrowers WHERE cardnumber=25;
>>
>> 2. The result will show the number associated with the staff member’s
>> permissions, for example:
>>
>> +-------+
>> | flags |
>> +-------+
>> | 16900 |
>> +-------+
>>
>> 3. Then update the field "flags" of another patron (here with
>> cardnumber 26) which should receive the same patron permissions:
>>
>> UPDATE borrowers SET flags=16900 WHERE cardnumber=26;
>>
>> I have tested this successfully on my demo installation.
>>
>> Best wishes: Michael
> _______________________________________________
> 
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha




More information about the Koha mailing list