The 'borrow permission' for staff category borrowers does not appear to be functional. Staff are still able to borrow items regardless of this permissions setting.
I'm trying to understand the purpose of this permission, myself. It seems there is no documentation on it. What I would assume it means is if it is checked, the patron can borrow. However, if this actually worked, it would mean all regular patrons would need this permission turned on. I would propose that the nature of this switch be change and read (cannot_borrow). This switch should limit the account so that it cannot be borrowed on. So, for example, if the account were a general circulation staff account, one could not check out items to this account if the permission were selected. Christopher
I'd gladly update the documentation if someone can tell me what it does. Nicole
It appears that there are some references to the borrow permission in the codebase, but I am not sure about the intended functionality either: Some examples: ... basket/basket.pl: flagsrequired => { borrow => 1 }, basket/downloadcart.pl: flagsrequired => { borrow => 1 }, basket/sendbasket.pl: flagsrequired => { borrow => 1 }, basket/sendbasket.pl: flagsrequired => { borrow => 1 }, ...
Created attachment 37382 [details] [review] Bug 7976: Remove the borrow permission The borrow permission was used but uselessly. For instance, at the opac, the flagsrequired parameter was set to 'borrow' but the 'authnotrequired' was set also (which means no auth required). At the end, this permission was used at only 1 place: for the basket, intranet side. This can be replaced with the catalogue permission (which is used to search). Test plan: 1/ Confirm that you are able to show/download/sent the cart (intranet side) with the catalogue permission. 2/ At the OPAC, you should be able to access the same pages as before with any other permissions. Concretely it is quite difficult to test this patch, you should have a look at the code.
Created attachment 37914 [details] [review] [SIGNED OFF] Bug 7976: Remove the borrow permission The borrow permission was used but uselessly. For instance, at the opac, the flagsrequired parameter was set to 'borrow' but the 'authnotrequired' was set also (which means no auth required). At the end, this permission was used at only 1 place: for the basket, intranet side. This can be replaced with the catalogue permission (which is used to search). Test plan: 1/ Confirm that you are able to show/download/sent the cart (intranet side) with the catalogue permission. 2/ At the OPAC, you should be able to access the same pages as before with any other permissions. Concretely it is quite difficult to test this patch, you should have a look at the code. Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Created attachment 37925 [details] [review] [PASSED QA] Bug 7976: Remove the borrow permission The borrow permission was used but uselessly. For instance, at the opac, the flagsrequired parameter was set to 'borrow' but the 'authnotrequired' was set also (which means no auth required). At the end, this permission was used at only 1 place: for the basket, intranet side. This can be replaced with the catalogue permission (which is used to search). Test plan: 1/ Confirm that you are able to show/download/sent the cart (intranet side) with the catalogue permission. 2/ At the OPAC, you should be able to access the same pages as before with any other permissions. Concretely it is quite difficult to test this patch, you should have a look at the code. Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Should we also adjust the borrowres.flags for staff users who had borrows permission? Any negative side effects if we don't?
Created attachment 37944 [details] [review] Bug 7976: Update borrowers.flags The borrowers.flags values need to be updated to prevent side effects. Test plan: Set the borrow permission flags for some borrowers Execute the updatedb entry and verify the flags has been updated (-128) only for borrowers with this permission set.
(In reply to Katrin Fischer from comment #7) > Should we also adjust the borrowres.flags for staff users who had borrows > permission? Any negative side effects if we don't? Yes you are right, to be safe it's certainly better :)
Created attachment 38900 [details] [review] [SIGNED-OFF] Bug 7976: Update borrowers.flags The borrowers.flags values need to be updated to prevent side effects. Test plan: Set the borrow permission flags for some borrowers Execute the updatedb entry and verify the flags has been updated (-128) only for borrowers with this permission set. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Moved updatedatabase entry (was in wrong position) to atomicupdate with commented copy of orignal No koha-qa errors
Created attachment 38901 [details] [review] [SIGNED-OFF] Bug 7976: Update borrowers.flags The borrowers.flags values need to be updated to prevent side effects. Test plan: Set the borrow permission flags for some borrowers Execute the updatedb entry and verify the flags has been updated (-128) only for borrowers with this permission set. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Moved updatedatabase entry (was in wrong position) to atomicupdate with commented copy of orignal No koha-qa errors
Created attachment 38974 [details] [review] [PASSED QA] Bug 7976: Update borrowers.flags The borrowers.flags values need to be updated to prevent side effects. Test plan: Set the borrow permission flags for some borrowers Execute the updatedb entry and verify the flags has been updated (-128) only for borrowers with this permission set. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Moved updatedatabase entry (was in wrong position) to atomicupdate with commented copy of orignal No koha-qa errors Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Patches pushed to master. Thanks Jonathan!
Hi all, The borrow permission is removed, but it existing in this files: opac/opac-idref.pl:40: flagsrequired => { borrow => 1 }, opac/opac-news-rss.pl:37: flagsrequired => { borrow => 1 }, opac/opac-restrictedpage.pl:43: flagsrequired => { borrow => 1 }, opac/svc/login:46 checkauth( $query, 1, { borrow => 1 }, 'opac', $decoded_json->{'email'} ); I think, it's a bug. Bouzid.
(In reply to Bouzid from comment #14) > Hi all, > The borrow permission is removed, but it existing in this files: > > opac/opac-idref.pl:40: flagsrequired => { borrow => 1 }, > opac/opac-news-rss.pl:37: flagsrequired => { borrow => 1 }, > opac/opac-restrictedpage.pl:43: flagsrequired => { borrow => 1 }, > opac/svc/login:46 checkauth( $query, 1, { borrow => 1 }, 'opac', > $decoded_json->{'email'} ); > > I think, it's a bug. > > Bouzid. Yes it is, it always better to open a new bug report, especially when the original one is marked as resolved. See bug 16447
Ok Jonathan. thanks. Bouzid.