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 5988-5993 CREATE TABLE `virtualshelves` ( Link Here
5988
  `allow_change_from_owner` tinyint(1) DEFAULT 1 COMMENT 'can owner change contents?',
5988
  `allow_change_from_owner` tinyint(1) DEFAULT 1 COMMENT 'can owner change contents?',
5989
  `allow_change_from_others` tinyint(1) DEFAULT 0 COMMENT 'can others change contents?',
5989
  `allow_change_from_others` tinyint(1) DEFAULT 0 COMMENT 'can others change contents?',
5990
  `allow_change_from_staff` tinyint(1) DEFAULT 0 COMMENT 'can staff change contents?',
5990
  `allow_change_from_staff` tinyint(1) DEFAULT 0 COMMENT 'can staff change contents?',
5991
  `allow_change_from_permitted_staff` tinyint(1) DEFAULT 0 COMMENT 'can staff with edit_public_list_contents permission change contents?',
5991
  PRIMARY KEY (`shelfnumber`),
5992
  PRIMARY KEY (`shelfnumber`),
5992
  KEY `virtualshelves_ibfk_1` (`owner`),
5993
  KEY `virtualshelves_ibfk_1` (`owner`),
5993
  CONSTRAINT `virtualshelves_ibfk_1` FOREIGN KEY (`owner`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE SET NULL
5994
  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 137-142 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
137
   (19, 'configure', 'Configure plugins'),
137
   (19, 'configure', 'Configure plugins'),
138
   (20, 'delete_public_lists', 'Delete public lists'),
138
   (20, 'delete_public_lists', 'Delete public lists'),
139
   (20, 'edit_public_lists', 'Edit public lists'),
139
   (20, 'edit_public_lists', 'Edit public lists'),
140
   (20, 'edit_public_list_contents', 'Edit public list contents'),
140
   (21, 'edit_templates', 'Create and update club templates'),
141
   (21, 'edit_templates', 'Create and update club templates'),
141
   (21, 'edit_clubs', 'Create and update clubs'),
142
   (21, 'edit_clubs', 'Create and update clubs'),
142
   (21, 'enroll', 'Enroll patrons in clubs'),
143
   (21, 'enroll', 'Enroll patrons in clubs'),
143
- 

Return to bug 30418