Bugzilla – Attachment 164433 Details for
Bug 35980
Add message to patron needs permission check
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35980: Check for CAN_user_borrowers_edit_borrowers in members-toolbar.inc
Bug-35980-Check-for-CANuserborrowerseditborrowers-.patch (text/plain), 2.41 KB, created by
Brendan Lawlor
on 2024-04-04 16:48:22 UTC
(
hide
)
Description:
Bug 35980: Check for CAN_user_borrowers_edit_borrowers in members-toolbar.inc
Filename:
MIME Type:
Creator:
Brendan Lawlor
Created:
2024-04-04 16:48:22 UTC
Size:
2.41 KB
patch
obsolete
>From e30b11766dcef5a47ef87a93f2cae4a8498c04d0 Mon Sep 17 00:00:00 2001 >From: Brendan Lawlor <blawlor@clamsnet.org> >Date: Thu, 4 Apr 2024 16:35:58 +0000 >Subject: [PATCH] Bug 35980: Check for CAN_user_borrowers_edit_borrowers in > members-toolbar.inc > >This patch removes the message button and more links from the members toolbar if the user does not have CAN_user_borrowers_edit_borrowers > >To test: >1. Log in with a user with only 'catalogue' and 'list_borrowers' permissions >2. Search for a patron >3. Notice the 'Add message' and 'More' buttons in the toolbar only link to permissions errors >3. Apply patch, restart all, reload the page >4. Notice the buttons in the toolbar are gone >--- > .../intranet-tmpl/prog/en/includes/members-toolbar.inc | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >index d530fc5758..b4f6c4c7bd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >@@ -44,13 +44,16 @@ > <a id="searchtohold" class="btn btn-default" href="#"><i class="fa fa-search"></i> Search to hold</a> > [% END %] > >- <a id="addnewmessageLabel" href="#add_message_form" data-toggle="modal" class="btn btn-default"><i class="fa-solid fa-comment"></i> Add message</a> >+ [% IF CAN_user_borrowers_edit_borrowers %] >+ <a id="addnewmessageLabel" href="#add_message_form" data-toggle="modal" class="btn btn-default"><i class="fa-solid fa-comment"></i> Add message</a> >+ [% END %] > > [% IF Koha.Preference('CurbsidePickup') %] > <a id="curbsidePickupLabel" href="/cgi-bin/koha/circ/curbside_pickups.pl?op=find-patron&borrowernumber=[% patron.borrowernumber | html %]" class="btn btn-default"><i class="fa-solid fa-rotate"></i> Schedule pickup</a> > [% END %] > >- <div class="btn-group"> >+ [% IF CAN_user_borrowers_edit_borrowers %] >+ <div class="btn-group"> > <button class="btn btn-default dropdown-toggle" data-toggle="dropdown">More <span class="caret"></span></button> > <ul class="dropdown-menu dropdown-menu-right"> > [% IF CAN_user_borrowers_edit_borrowers %] >@@ -113,7 +116,8 @@ > [% END %] > [% END %] > </ul> >- </div> >+ </div> >+ [% END %] > </div> > > <!-- Modal --> >-- >2.30.2
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 35980
:
164433
|
164434
|
164435
|
164488
|
164489
|
164623
|
164624
|
164625