Bugzilla – Attachment 93053 Details for
Bug 23101
Contracts permissions for staff patron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23101: Hide action buttons on contracts if user lacks permission
Bug-23101-Hide-action-buttons-on-contracts-if-user.patch (text/plain), 4.05 KB, created by
Bouzid Fergani
on 2019-09-20 20:36:02 UTC
(
hide
)
Description:
Bug 23101: Hide action buttons on contracts if user lacks permission
Filename:
MIME Type:
Creator:
Bouzid Fergani
Created:
2019-09-20 20:36:02 UTC
Size:
4.05 KB
patch
obsolete
>From 7cfe568a4672e99c032c4202dca15b2e99bf851f Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Fri, 12 Jul 2019 12:40:22 +0000 >Subject: [PATCH] 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> >--- > .../intranet-tmpl/prog/en/modules/acqui/supplier.tt | 18 +++++++++++++----- > 1 file changed, 13 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt >index 4ed27db..47414e8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt >@@ -351,7 +351,9 @@ > <th scope="col">Description</th> > <th scope="col" class="title-string">Start date</th> > <th scope="col" class="title-string">End date</th> >- <th scope="col">Actions</th> >+ [% IF CAN_user_acquisition_contracts_manage %] >+ <th scope="col">Actions</th> >+ [% END %] > </tr> > </thead> > <tbody> >@@ -363,10 +365,12 @@ > <td>[% contract.contractdescription | html %]</td> > <td><span title="[% contract.contractstartdate | html %]">[% contract.contractstartdate | $KohaDates %]</span></td> > <td><span title="[% contract.contractenddate | html %]">[% contract.contractenddate | $KohaDates %]</span></td> >- <td class="actions"> >- <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&contractnumber=[% contract.contractnumber | html %]&booksellerid=[% contract.booksellerid | html %]"><i class="fa fa-pencil"></i> Edit</a> >- <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/aqcontract.pl?op=delete_confirm&contractnumber=[% contract.contractnumber | html %]&booksellerid=[% contract.booksellerid | html %]"><i class="fa fa-trash"></i> Delete</a> >- </td> >+ [% IF CAN_user_acquisition_contracts_manage %] >+ <td class="actions"> >+ <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&contractnumber=[% contract.contractnumber | html %]&booksellerid=[% contract.booksellerid | html %]"><i class="fa fa-pencil"></i> Edit</a> >+ <a class="btn btn-default btn-xs" href="/cgi-bin/koha/admin/aqcontract.pl?op=delete_confirm&contractnumber=[% contract.contractnumber | html %]&booksellerid=[% contract.booksellerid | html %]"><i class="fa fa-trash"></i> Delete</a> >+ </td> >+ [% END %] > </tr> > [% END %] > </tbody> >@@ -426,7 +430,11 @@ > $(document).ready(function() { > var contractst = $("#contractst").dataTable($.extend(true, {}, dataTablesDefaults, { > "aoColumnDefs": [ >+ [% IF CAN_user_acquisition_contracts_manage %] > { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, >+ [% ELSE %] >+ { "bSortable": false, "bSearchable": false }, >+ [% END %] > { "sType": "title-string", "aTargets" : [ "title-string" ] } > ], > 'sDom': 't' >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23101
:
90527
|
91510
|
92729
|
93053
|
93185
|
93864