Bugzilla – Attachment 147446 Details for
Bug 32976
Patron image Add/Edit button should not appear if permission is turned off
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32976: Add permission check on Add/Edit controls for patron images
Bug-32976-Add-permission-check-on-AddEdit-controls.patch (text/plain), 3.28 KB, created by
Owen Leonard
on 2023-02-27 14:53:03 UTC
(
hide
)
Description:
Bug 32976: Add permission check on Add/Edit controls for patron images
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2023-02-27 14:53:03 UTC
Size:
3.28 KB
patch
obsolete
>From 69225bdfe7db1980a1afc73cfa501f09b4e195c1 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Sun, 26 Feb 2023 11:20:34 +0000 >Subject: [PATCH] Bug 32976: Add permission check on Add/Edit controls for > patron images > >This adds a check on the batch_upload_patron_images permission >to the Add/Edit control for patron images in the patron account >in the staff interface. > >To test: >* Enable patronimages system preference >* With your 'superlibrarian' account: >* Add and edit/remove a patron image to an account >* Create a staff user with batch_upload_patron_images permission >* Log in with this user and verify everything works the same > as before >* Remove the batch_upload_patron_images permission >* Verify the Add/Edit controls are on longer visible to this > patron > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > .../intranet-tmpl/prog/en/includes/circ-menu.inc | 16 ++++++++++------ > 1 file changed, 10 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >index be02b213ec..2e04c4e5ea 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >@@ -36,14 +36,18 @@ > <div class="patronimage-container"> > [% IF ( patron.image ) %] > <img src="/cgi-bin/koha/members/patronimage.pl?borrowernumber=[% patron.borrowernumber | uri %]" class="patronimage" alt="[% patron.firstname | html %] [% patron.surname | html %] ([% patron.cardnumber | html %])" /> >- <div class="patronimage-controls"> >- <div class="patronimage-control"><a data-borrowernumber="[% patron.borrowernumber | uri %]" data-cardnumber="[% patron.cardnumber | html %]" class="btn btn-default edit-patronimage" title="Patron photo" href="#"><i class="fa fa-pencil"></i> Edit</a></div> >- </div> >+ [% IF ( CAN_user_tools_batch_upload_patron_images ) %] >+ <div class="patronimage-controls"> >+ <div class="patronimage-control"><a data-borrowernumber="[% patron.borrowernumber | uri %]" data-cardnumber="[% patron.cardnumber | html %]" class="btn btn-default edit-patronimage" title="Patron photo" href="#"><i class="fa fa-pencil"></i> Edit</a></div> >+ </div> >+ [% END %] > [% ELSE %] > <div class="patronimage empty"></div> >- <div class="patronimage-controls"> >- <div class="patronimage-control"><a data-borrowernumber="[% patron.borrowernumber | uri %]" data-cardnumber="[% patron.cardnumber | html %]" class="btn btn-default edit-patronimage" title="Patron photo" href="#"><i class="fa fa-plus"></i> Add</a></div> >- </div> >+ [% IF ( CAN_user_tools_batch_upload_patron_images ) %] >+ <div class="patronimage-controls"> >+ <div class="patronimage-control"><a data-borrowernumber="[% patron.borrowernumber | uri %]" data-cardnumber="[% patron.cardnumber | html %]" class="btn btn-default edit-patronimage" title="Patron photo" href="#"><i class="fa fa-plus"></i> Add</a></div> >+ </div> >+ [% END %] > [% END %] > </div> > </div> >-- >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 32976
:
147420
|
147446
|
147462
|
148638