Bugzilla – Attachment 118874 Details for
Bug 15788
Split borrowers permission into create/edit and delete
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15788: Add delete_borrowers permission
Bug-15788-Add-deleteborrowers-permission.patch (text/plain), 3.07 KB, created by
David Nind
on 2021-03-26 18:43:10 UTC
(
hide
)
Description:
Bug 15788: Add delete_borrowers permission
Filename:
MIME Type:
Creator:
David Nind
Created:
2021-03-26 18:43:10 UTC
Size:
3.07 KB
patch
obsolete
>From d56a87ce801fbe8dd890046086ce0cb423e99667 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 12 Jan 2021 14:06:45 +0000 >Subject: [PATCH] Bug 15788: Add delete_borrowers permission > >Signed-off-by: David Nind <david@davidnind.com> >--- > installer/data/mysql/atomicupdate/bug_15788.perl | 20 ++++++++++++++++++++ > installer/data/mysql/mandatory/userpermissions.sql | 1 + > .../intranet-tmpl/prog/en/includes/permissions.inc | 5 +++++ > 3 files changed, 26 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_15788.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_15788.perl b/installer/data/mysql/atomicupdate/bug_15788.perl >new file mode 100644 >index 0000000000..98e5d27430 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_15788.perl >@@ -0,0 +1,20 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if ( CheckVersion($DBversion) ) { >+ >+ $dbh->do( >+ qq{ >+ INSERT IGNORE permissions (module_bit, code, description) >+ VALUES >+ (4, 'delete_borrowers', 'Delete borrowers') >+ } >+ ); >+ >+ $dbh->do( >+ qq{ >+ INSERT IGNORE INTO user_permissions (borrowernumber, module_bit, code) >+ SELECT borrowernumber, 4, 'delete_borrowers' FROM borrowers WHERE borrowernumber IN ( SELECT borrowernumber FROM user_permissions WHERE code = 'edit_borrowers') >+ } >+ ); >+ >+ NewVersion( $DBversion, 15788, "Split edit_borrowers permission" ); >+} >diff --git a/installer/data/mysql/mandatory/userpermissions.sql b/installer/data/mysql/mandatory/userpermissions.sql >index 066e99daf7..edb52f0fdd 100644 >--- a/installer/data/mysql/mandatory/userpermissions.sql >+++ b/installer/data/mysql/mandatory/userpermissions.sql >@@ -36,6 +36,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES > ( 3, 'manage_keyboard_shortcuts', 'Manage keyboard shortcuts for the advanced cataloging editor'), > ( 3, 'manage_smtp_servers', 'Manage SMTP servers configuration'), > ( 3, 'manage_background_jobs', 'Manage background jobs'), >+ ( 4, 'delete_borrowers', 'Delete patrons'), > ( 4, 'edit_borrowers', 'Add, modify and view patron information'), > ( 4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'), > ( 6, 'place_holds', 'Place holds for patrons'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >index eabe4d51ee..1ffce70b1f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >@@ -265,6 +265,11 @@ > Manage background jobs > </span> > <span class="permissioncode">([% name | html %])</span> >+ [%- CASE 'delete_borrowers' -%] >+ <span class="sub_permission delete_borrowers_subpermission"> >+ Delete patrons >+ </span> >+ <span class="permissioncode">([% name | html %])</span> > [%- CASE 'edit_borrowers' -%] > <span class="sub_permission edit_borrowers_subpermission"> > Add, modify and view patron information >-- >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 15788
:
115091
|
115092
|
118865
|
118866
|
118874
|
118875
|
121887
|
121888
|
121889
|
121890