Created attachment 90527 [details] vendor page Dears, Koha 19.00 I have created a staff Patron with no Contracts permissions only ( Manage basket and order lines,Receive orders and manage shipments ) In the vendor page, the patron can view contracts and actions button are available (delete, edit), if he click one of those actions, will redirected to the login page. so, my recommendation, to remove those action bottoms at all if the user dont have the permission. Regards
Created attachment 91510 [details] [review] Bug 23101: Hide action buttons on contracts if user lacks permission When the user doesn't have superlibrarian, full acq or contracts_manage permission, don't show buttons for editing and deleting contracts. To test: - Create a vendor with a few contracts - Create a staff user with - superlibrarian = can view edit/delete contracts - full acq perms = same - without manage_contracts = can view, but action buttons are gone - Make sure the sorting of the contracts table works in all cases
Created attachment 92729 [details] [review] Bug 23101: Hide action buttons on contracts if user lacks permission When the user doesn't have superlibrarian, full acq or contracts_manage permission, don't show buttons for editing and deleting contracts. To test: - Create a vendor with a few contracts - Create a staff user with - superlibrarian = can view edit/delete contracts - full acq perms = same - without manage_contracts = can view, but action buttons are gone - Make sure the sorting of the contracts table works in all cases Signed-off-by: hc <hc@interleaf.ie>
Created attachment 93053 [details] [review] Bug 23101: Hide action buttons on contracts if user lacks permission When the user doesn't have superlibrarian, full acq or contracts_manage permission, don't show buttons for editing and deleting contracts. To test: - Create a vendor with a few contracts - Create a staff user with - superlibrarian = can view edit/delete contracts - full acq perms = same - without manage_contracts = can view, but action buttons are gone - Make sure the sorting of the contracts table works in all cases Signed-off-by: hc <hc@interleaf.ie> Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Created attachment 93185 [details] [review] Bug 23101: Hide action buttons on contracts if user lacks permission When the user doesn't have superlibrarian, full acq or contracts_manage permission, don't show buttons for editing and deleting contracts. To test: - Create a vendor with a few contracts - Create a staff user with - superlibrarian = can view edit/delete contracts - full acq perms = same - without manage_contracts = can view, but action buttons are gone - Make sure the sorting of the contracts table works in all cases Signed-off-by: hc <hc@interleaf.ie> Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Nice work! Pushed to master for 19.11.00
I'm sure about : + [% IF CAN_user_acquisition_contracts_manage %] { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, + [% ELSE %] + { "bSortable": false, "bSearchable": false }, + [% END %] { "sType": "title-string", "aTargets" : [ "title-string" ] } Shouldn't we remove the all line instead of only "aTargets" ?
Confirmed on irc, we need to use a class for no-sorting. I'm on a patch
Created attachment 93864 [details] [review] Bug 23101: (follow-up) use NoSort class in datatable
Followup pushed, thanks Fridolin
Thx a lot, Frido!
Pushed to 19.05.x for 19.05.05
backported to 18.11.x for 18.11.11