@@ -, +, @@ - Adds allow_change_from_staff to virtualshelves table - Add edit_public_lists sub-permission --- installer/data/mysql/atomicupdate/bug_26346.perl | 9 +++++++++ installer/data/mysql/kohastructure.sql | 1 + installer/data/mysql/mandatory/userpermissions.sql | 1 + 3 files changed, 11 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_26346.perl --- a/installer/data/mysql/atomicupdate/bug_26346.perl +++ a/installer/data/mysql/atomicupdate/bug_26346.perl @@ -0,0 +1,9 @@ +$DBversion = 'XXX'; +if ( CheckVersion($DBversion) ) { + if ( !column_exists( 'virtualshelves', 'allow_change_from_staff' ) ) { + $dbh->do(q{ALTER TABLE virtualshelves ADD COLUMN `allow_change_from_staff` tinyint(1) DEFAULT '0' COMMENT 'can staff change contents?'}); + } + + $dbh->do(q{ INSERT IGNORE INTO permissions (module_bit, code, description) VALUES (20, 'edit_public_lists', 'Edit public lists') }); + NewVersion( $DBversion, 26346, "Add allow_change_from_staff to virtualshelves table" ); +} --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -5340,6 +5340,7 @@ CREATE TABLE `virtualshelves` ( `created_on` datetime NOT NULL COMMENT 'creation time', `allow_change_from_owner` tinyint(1) DEFAULT 1 COMMENT 'can owner change contents?', `allow_change_from_others` tinyint(1) DEFAULT 0 COMMENT 'can others change contents?', + `allow_change_from_staff` tinyint(1) DEFAULT 0 COMMENT 'can staff change contents?', PRIMARY KEY (`shelfnumber`), KEY `virtualshelves_ibfk_1` (`owner`), CONSTRAINT `virtualshelves_ibfk_1` FOREIGN KEY (`owner`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE SET NULL --- a/installer/data/mysql/mandatory/userpermissions.sql +++ a/installer/data/mysql/mandatory/userpermissions.sql @@ -127,6 +127,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES (19, 'report', 'Use report plugins'), (19, 'configure', 'Configure plugins'), (20, 'delete_public_lists', 'Delete public lists'), + (20, 'edit_public_lists', 'Edit public lists'), (21, 'edit_templates', 'Create and update club templates'), (21, 'edit_clubs', 'Create and update clubs'), (21, 'enroll', 'Enroll patrons in clubs'), --