View | Details | Raw Unified | Return to bug 30418
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_30418.pl (+16 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "30418",
5
    description => "Add new list permission and new column to virtualshelves",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        
10
	if( !column_exists( 'virtualshelves', 'allow_change_from_permitted_staff' ) ) {
11
	    $dbh->do(q{ALTER TABLE virtualshelves ADD COLUMN `allow_change_from_permitted_staff` tinyint(1) DEFAULT '0' COMMENT 'can staff with edit_public_list_contents permission change contents?'});
12
        }
13
14
	$dbh->do(q{ INSERT IGNORE INTO permissions (module_bit, code, description) VALUES (20, 'edit_public_list_contents', 'Edit public list contents') });
15
    },
16
};
(-)a/installer/data/mysql/kohastructure.sql (+1 lines)
Lines 5527-5532 CREATE TABLE `virtualshelves` ( Link Here
5527
  `allow_change_from_owner` tinyint(1) DEFAULT 1 COMMENT 'can owner change contents?',
5527
  `allow_change_from_owner` tinyint(1) DEFAULT 1 COMMENT 'can owner change contents?',
5528
  `allow_change_from_others` tinyint(1) DEFAULT 0 COMMENT 'can others change contents?',
5528
  `allow_change_from_others` tinyint(1) DEFAULT 0 COMMENT 'can others change contents?',
5529
  `allow_change_from_staff` tinyint(1) DEFAULT 0 COMMENT 'can staff change contents?',
5529
  `allow_change_from_staff` tinyint(1) DEFAULT 0 COMMENT 'can staff change contents?',
5530
  `allow_change_from_permitted_staff` tinyint(1) DEFAULT 0 COMMENT 'can staff with edit_public_list_contents permission change contents?',  
5530
  PRIMARY KEY (`shelfnumber`),
5531
  PRIMARY KEY (`shelfnumber`),
5531
  KEY `virtualshelves_ibfk_1` (`owner`),
5532
  KEY `virtualshelves_ibfk_1` (`owner`),
5532
  CONSTRAINT `virtualshelves_ibfk_1` FOREIGN KEY (`owner`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE SET NULL
5533
  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 (-1 / +1 lines)
Lines 131-136 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
131
   (19, 'configure', 'Configure plugins'),
131
   (19, 'configure', 'Configure plugins'),
132
   (20, 'delete_public_lists', 'Delete public lists'),
132
   (20, 'delete_public_lists', 'Delete public lists'),
133
   (20, 'edit_public_lists', 'Edit public lists'),
133
   (20, 'edit_public_lists', 'Edit public lists'),
134
   (20, 'edit_public_list_contents', 'Edit public list contents'),
134
   (21, 'edit_templates', 'Create and update club templates'),
135
   (21, 'edit_templates', 'Create and update club templates'),
135
   (21, 'edit_clubs', 'Create and update clubs'),
136
   (21, 'edit_clubs', 'Create and update clubs'),
136
   (21, 'enroll', 'Enroll patrons in clubs'),
137
   (21, 'enroll', 'Enroll patrons in clubs'),
137
- 

Return to bug 30418