From 4149055445d921e7aec82d847e03e4c35841137b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 5 Jan 2015 10:36:33 +0100 Subject: [PATCH] Bug 13417: (qa follow-up) Rename the permission to delete_public_lists Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- C4/VirtualShelves.pm | 2 +- installer/data/mysql/en/mandatory/userflags.sql | 2 +- installer/data/mysql/en/mandatory/userpermissions.sql | 2 +- installer/data/mysql/updatedatabase.pl | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm index 8fd003a89c..7905b56df8 100644 --- a/C4/VirtualShelves.pm +++ b/C4/VirtualShelves.pm @@ -466,7 +466,7 @@ sub ShelfPossibleAction { if ( $user > 0 and $action eq 'delete_shelf' ) { my $borrower = C4::Members::GetMember( borrowernumber => $user ); return 1 - if C4::Auth::haspermission( $borrower->{userid}, { shelves => 'delete_shelves' } ); + if C4::Auth::haspermission( $borrower->{userid}, { shelves => 'delete_public_lists' } ); } my $dbh = C4::Context->dbh; diff --git a/installer/data/mysql/en/mandatory/userflags.sql b/installer/data/mysql/en/mandatory/userflags.sql index c027b1d80d..40ca2b6063 100644 --- a/installer/data/mysql/en/mandatory/userflags.sql +++ b/installer/data/mysql/en/mandatory/userflags.sql @@ -18,5 +18,5 @@ INSERT INTO userflags (bit, flag, flagdesc, defaulton) VALUES (17,'staffaccess','Allow staff members to modify permissions for other staff members',0), (18,'coursereserves','Course reserves',0), (19, 'plugins', 'Koha plugins', '0'), -(20, 'shelves', 'Virtual shelves', 0) +(20, 'lists', 'Lists', 0) ; diff --git a/installer/data/mysql/en/mandatory/userpermissions.sql b/installer/data/mysql/en/mandatory/userpermissions.sql index a5f574faf6..71993dca3f 100644 --- a/installer/data/mysql/en/mandatory/userpermissions.sql +++ b/installer/data/mysql/en/mandatory/userpermissions.sql @@ -72,5 +72,5 @@ INSERT INTO permissions (module_bit, code, description) VALUES (19, 'tool', 'Use tool plugins'), (19, 'report', 'Use report plugins'), (19, 'configure', 'Configure plugins'), - (20, 'delete_shelves', 'Delete shelves') + (20, 'delete_public_lists', 'Delete public lists') ; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index bdb6efa12e..a902093719 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -9763,13 +9763,13 @@ $DBversion = "3.19.00.XXX"; if ( CheckVersion($DBversion) ) { $dbh->do(q| INSERT INTO userflags (bit, flag, flagdesc, defaulton) VALUES - (20, 'shelves', 'Virtual shelves', 0) + (20, 'lists', 'Lists', 0) |); $dbh->do(q| INSERT INTO permissions (module_bit, code, description) VALUES - (20, 'delete_shelves', 'Delete shelves') + (20, 'delete_public_lists', 'Delete public lists') |); - print "Upgrade to $DBversion done (Bug 13417: Add permission to delete shelves)\n"; + print "Upgrade to $DBversion done (Bug 13417: Add permission to delete public lists)\n"; SetVersion ($DBversion); } -- 2.39.5