Bug 30418: (follow-up) Fixes for QA test tools

Sponsored-by: Catalyst IT, New Zealand

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Alex Buckley 2023-02-13 16:09:04 +00:00 committed by Tomas Cohen Arazi
parent f4f5d0d2f7
commit 461c0708b0
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
2 changed files with 7 additions and 3 deletions

View File

@ -237,5 +237,9 @@ __PACKAGE__->add_columns(
'+allow_change_from_staff' => { is_boolean => 1 },
);
__PACKAGE__->add_columns(
'+allow_change_from_permitted_staff' => { is_boolean => 1 },
);
# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;

View File

@ -7,10 +7,10 @@ return {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
if( !column_exists( 'virtualshelves', 'allow_change_from_permitted_staff' ) ) {
$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?'});
if( !column_exists( 'virtualshelves', 'allow_change_from_permitted_staff' ) ) {
$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?'});
}
$dbh->do(q{ INSERT IGNORE INTO permissions (module_bit, code, description) VALUES (20, 'edit_public_list_contents', 'Edit public list contents') });
$dbh->do(q{ INSERT IGNORE INTO permissions (module_bit, code, description) VALUES (20, 'edit_public_list_contents', 'Edit public list contents') });
},
};