Bugzilla – Attachment 94266 Details for
Bug 23112
Add circulation process to inter-library loans
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23112: Add permission checks
Bug-23112-Add-permission-checks.patch (text/plain), 2.82 KB, created by
Andrew Isherwood
on 2019-10-16 09:04:05 UTC
(
hide
)
Description:
Bug 23112: Add permission checks
Filename:
MIME Type:
Creator:
Andrew Isherwood
Created:
2019-10-16 09:04:05 UTC
Size:
2.82 KB
patch
obsolete
>From bf15f2703e047b92a456e3658549069549e2f705 Mon Sep 17 00:00:00 2001 >From: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> >Date: Mon, 29 Jul 2019 09:08:41 +0100 >Subject: [PATCH] Bug 23112: Add permission checks > >We only want the ILL circulation functionality to be available if the >appropriate syspref and perm are available, this patch adds those >checks. > >Sponsored-by: Loughborough University >--- > Koha/Illrequest.pm | 2 ++ > .../intranet-tmpl/prog/en/modules/ill/ill-requests.tt | 16 ++++++++++++++++ > 2 files changed, 18 insertions(+) > >diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm >index 2987a7af4e..7b427fd28b 100644 >--- a/Koha/Illrequest.pm >+++ b/Koha/Illrequest.pm >@@ -494,6 +494,8 @@ sub _core_status_graph { > id => 'CHK', > name => 'Checked out', > ui_method_name => 'Check out', >+ needs_prefs => [ 'CirculateILL' ], >+ needs_perms => [ 'user_circulate_circulate_remaining_permissions' ], > method => 'check_out', > next_actions => [ ], > ui_method_icon => 'fa-upload', >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >index 2a0c1b6f68..3e59005a55 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >@@ -439,6 +439,22 @@ > Edit request > </a> > [% FOREACH action IN request.available_actions %] >+ [% needs_prefs = action.needs_prefs.size ? action.needs_prefs : [] %] >+ [% needs_perms = action.needs_perms.size ? action.needs_perms : [] %] >+ [% has_prefs_count = 0 %] >+ [% has_perms_count = 0 %] >+ [% FOREACH pref IN needs_prefs %] >+ [% IF Koha.Preference(pref) %] >+ [% has_prefs_count = has_prefs_count + 1 %] >+ [% END %] >+ [% END %] >+ [% FOREACH perm IN needs_perms %] >+ [% perm_name = 'CAN_' _ perm %] >+ [% IF ($perm_name) %] >+ [% has_perms_count = has_perms_count + 1 %] >+ [% END %] >+ [% END %] >+ [% NEXT IF has_prefs_count < needs_prefs.size || has_perms_count < needs_perms.size %] > [% IF action.method == 'migrate' %] > [% IF backends.size > 2 %] > <div class="dropdown btn-group"> >-- >2.11.0
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 23112
:
91987
|
91988
|
91989
|
91990
|
91991
|
92000
|
92001
|
92002
|
92003
|
92004
|
93530
|
93531
|
93532
|
93533
|
93534
|
93958
|
94264
|
94265
|
94266
|
94267
|
94268
|
94269
|
95565
|
95566
|
95567
|
95568
|
95569
|
95570
|
96834
|
96870
|
99910
|
99911
|
99912
|
99913
|
99914
|
99915
|
99916
|
99917
|
100100
|
100101
|
100102
|
100103
|
100104
|
100105
|
100106
|
100107
|
100108
|
100169
|
100224
|
100225
|
100252
|
100253
|
100254
|
100255
|
100256
|
100257
|
100258
|
100259
|
100260
|
100261
|
100262
|
100263