How to copy patron permissions?
Hi Is it possible to copy the permissions of another patron when creating a new one? I always thought this would happen when copying/duplicating an existing patron. But when I actually tried it today the permissions were not there with the new patron and I had to set them manually. Best wishes: Michael Kuhn -- 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@adminkuhn.ch · W www.adminkuhn.ch
Hello Michael- I so wish I knew of a way of duplicating an existing record for library staff and retaining the staff permissions as we have a lot of sites, and quite a lot of staff turnover. So being able to retain the permissions (especially for library assistants who have 'standard' permissions, and who move on to other jobs quite quickly sometimes) would be great. It would save a lot of tedious permissions 'box ticking'. Ray Delahunty University of the Arts London -----Original Message----- From: Koha <koha-bounces@lists.katipo.co.nz> On Behalf Of Michael Kuhn Sent: 26 April 2022 09:40 To: Koha <koha@lists.katipo.co.nz> Subject: [Koha] How to copy patron permissions? Hi Is it possible to copy the permissions of another patron when creating a new one? I always thought this would happen when copying/duplicating an existing patron. But when I actually tried it today the permissions were not there with the new patron and I had to set them manually. Best wishes: Michael Kuhn -- 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@adminkuhn.ch · W www.adminkuhn.ch _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha This email and any attachments are intended solely for the addressee and may contain confidential information. If you are not the intended recipient of this email and/or its attachments you must not take any action based upon them and you must not copy or show them to anyone. Please send the email back to us and immediately and permanently delete it and its attachments. Where this email is unrelated to the business of University of the Arts London or of any of its group companies the opinions expressed in it are the opinions of the sender and do not necessarily constitute those of University of the Arts London (or the relevant group company). Where the sender's signature indicates that the email is sent on behalf of UAL Short Courses Limited the following also applies: UAL Short Courses Limited is a company registered in England and Wales under company number 02361261. Registered Office: University of the Arts London, 272 High Holborn, London WC1V 7EY
Is it possible to copy the permissions of another patron when creating a new one?
Not exactly what you're looking for, but your question prompted me to start working on Bug 30623, "Copy permissions from one user to another" (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30623). -- Owen
Hi Michael. At the recent koha-US Web Development Group Special Interest Group meeting there was some discussion about using some JavaScript to do this. Resources: - Meeting recording: https://www.youtube.com/watch?v=3HBpWHmyLKU (from about the 1:00 minute to 6:00 minutes) - JS: https://wiki.koha-community.org/wiki/JQuery_Library#Add_clear_and_preset_per... It may be worth contacting Jason to get his updated code if this is what you are trying to do. David Nind | david.nind@gmail.com 387 Whartons Road, RD 10D, Oamaru 9492 p. +64 3 4395 306 | m. +64 21 0537 847 On Tue, 26 Apr 2022 at 20:40, Michael Kuhn <mik@adminkuhn.ch> wrote:
Hi
Is it possible to copy the permissions of another patron when creating a new one?
I always thought this would happen when copying/duplicating an existing patron. But when I actually tried it today the permissions were not there with the new patron and I had to set them manually.
Best wishes: Michael Kuhn -- 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@adminkuhn.ch · W www.adminkuhn.ch _______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Also, there are a couple of plugins listed here that may be useful to look at: https://wiki.koha-community.org/wiki/Koha_plugins#Patron_plugins David
Seems like copying permissions is not the right solution here, but rather defining roles and placing patrons (staff) into those roles would be a better fit. Sadly, I don't think this is currently supported, either. Joel Coehoorn Director of Information Technology York College of Nebraska On Tue, Apr 26, 2022 at 4:20 PM David Nind <david.nind@gmail.com> wrote:
Also, there are a couple of plugins listed here that may be useful to look at: https://wiki.koha-community.org/wiki/Koha_plugins#Patron_plugins
David _______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Greetings! I do not believe that's correct. You may create a patron list with specific permissions for that group; when you add the patron to that list, then they'll have whatever permissions you assigned to that list. I do this for staff and student workers who have different permissions. Our students may not adjust budgets or have acquisition access, but may have certain circulation functions, for example. You're likely not giving a large group of people permissions for the staff side of Koha, so it's quite manageable. We have around 37,000 students and more users if faculty/staff are included, but only around a few hundred library staff/faculty/students; not all of those are granted permissions. Best, Michael _________________________________________ *Michael J. Sutherland* Virginia Tech | University Libraries sudrland@vt.edu | 540.231.9669 <+15402319669> | 812.391.0644 <+18123910644> On Tue, Apr 26, 2022 at 5:25 PM Coehoorn, Joel <jcoehoorn@york.edu> wrote:
Seems like copying permissions is not the right solution here, but rather defining roles and placing patrons (staff) into those roles would be a better fit. Sadly, I don't think this is currently supported, either.
Joel Coehoorn Director of Information Technology York College of Nebraska
On Tue, Apr 26, 2022 at 4:20 PM David Nind <david.nind@gmail.com> wrote:
Also, there are a couple of plugins listed here that may be useful to look at: https://wiki.koha-community.org/wiki/Koha_plugins#Patron_plugins
David _______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
Hi all, I think the feature Michael describes is implemented using this plugin: https://github.com/bywatersolutions/koha-plugin-batch-permissions-modifier Hope this helps, Katrin On 26.04.22 23:47, Michael Sutherland wrote:
Greetings!
I do not believe that's correct. You may create a patron list with specific permissions for that group; when you add the patron to that list, then they'll have whatever permissions you assigned to that list. I do this for staff and student workers who have different permissions. Our students may not adjust budgets or have acquisition access, but may have certain circulation functions, for example. You're likely not giving a large group of people permissions for the staff side of Koha, so it's quite manageable. We have around 37,000 students and more users if faculty/staff are included, but only around a few hundred library staff/faculty/students; not all of those are granted permissions.
Best, Michael _________________________________________ *Michael J. Sutherland* Virginia Tech | University Libraries sudrland@vt.edu | 540.231.9669 <+15402319669> | 812.391.0644 <+18123910644>
On Tue, Apr 26, 2022 at 5:25 PM Coehoorn, Joel <jcoehoorn@york.edu> wrote:
Seems like copying permissions is not the right solution here, but rather defining roles and placing patrons (staff) into those roles would be a better fit. Sadly, I don't think this is currently supported, either.
Joel Coehoorn Director of Information Technology York College of Nebraska
On Tue, Apr 26, 2022 at 4:20 PM David Nind <david.nind@gmail.com> wrote:
Also, there are a couple of plugins listed here that may be useful to look at: https://wiki.koha-community.org/wiki/Koha_plugins#Patron_plugins
David _______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
_______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
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 -- 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@adminkuhn.ch · W www.adminkuhn.ch
Hi Michael, 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. Hope that helps, Katrin 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
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@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@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
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.
Yes, you are right. To circumvent this problem it is necessary to do the following. 1. Find the borrowernumber (here: 11) of a patron which has the desired patron permissions, then search for the patron permissions of this patron: SELECT flags FROM borrowers WHERE borrowernumber=11; 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 a new patron (here with borrowernumber 12) which currently has no permissions but which should receive the same top level permissions as the original patron: UPDATE borrowers SET flags=16900 WHERE borrowernumber=12; 4. Update the fields in table "user_permissions" of this patron (here with borrowernumber 12) which should also receive the same sub-permissions as the original patron (here with borrowernumber 11): INSERT INTO user_permissions (borrowernumber, module_bit, code) SELECT 12, module_bit, code FROM user_permissions WHERE borrowernumber=11; I have tested this successfully on my demo installation. 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@adminkuhn.ch · W www.adminkuhn.ch
Hi Michael! We've been using that plugin since January 2019, implemented by ByWater Solutions, so it appears safe and has not been an issue. However, if your policy is to only use what has been vetted by the community in the Q/A process and a part of Koha's code, that's fair. Sincerely, Michael _________________________________________ *Michael J. Sutherland* Virginia Tech | University Libraries sudrland@vt.edu | 540.231.9669 <+15402319669> | 812.391.0644 <+18123910644> On Wed, Apr 27, 2022 at 6:32 AM Michael Kuhn <mik@adminkuhn.ch> 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 -- 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@adminkuhn.ch · W www.adminkuhn.ch _______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
participants (7)
-
Coehoorn, Joel -
David Nind -
Katrin Fischer -
Michael Kuhn -
Michael Sutherland -
Owen Leonard -
Raymund Delahunty