Summary: | Contracts permissions for staff patron | ||
---|---|---|---|
Product: | Koha | Reporter: | Mohamad Barham <mbarham> |
Component: | Acquisitions | Assignee: | Katrin Fischer <katrin.fischer> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | minor | ||
Priority: | P5 - low | CC: | fridolin.somers, hc, lucas, m.de.rooy, martin.renvoize, mbarham |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
19.11.00,19.05.05
|
|
Circulation function: | |||
Attachments: |
vendor page
Bug 23101: Hide action buttons on contracts if user lacks permission Bug 23101: Hide action buttons on contracts if user lacks permission Bug 23101: Hide action buttons on contracts if user lacks permission Bug 23101: Hide action buttons on contracts if user lacks permission Bug 23101: (follow-up) use NoSort class in datatable |
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 Nice work! Pushed to master for 19.11.00 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 |
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