Bugzilla – Attachment 132475 Details for
Bug 26346
Add option to make a public list editable by library staff only
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26346: Database changes
Bug-26346-Database-changes.patch (text/plain), 2.90 KB, created by
Lucas Gass (lukeg)
on 2022-03-29 16:22:16 UTC
(
hide
)
Description:
Bug 26346: Database changes
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2022-03-29 16:22:16 UTC
Size:
2.90 KB
patch
obsolete
>From f56330596377cd71832319de66bc2c8326e7d99b Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Fri, 2 Jul 2021 06:46:12 +0000 >Subject: [PATCH] Bug 26346: Database changes > >- Adds allow_change_from_staff to virtualshelves table >- Add edit_public_lists sub-permission > >Sponsored-By: Catalyst IT > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > 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 > >diff --git a/installer/data/mysql/atomicupdate/bug_26346.perl b/installer/data/mysql/atomicupdate/bug_26346.perl >new file mode 100644 >index 0000000000..6d97a28906 >--- /dev/null >+++ b/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" ); >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 69b3613963..5a7616c8d9 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/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 >diff --git a/installer/data/mysql/mandatory/userpermissions.sql b/installer/data/mysql/mandatory/userpermissions.sql >index e69ba19720..6241c1a1ff 100644 >--- a/installer/data/mysql/mandatory/userpermissions.sql >+++ b/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'), >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26346
:
119686
|
120663
|
120664
|
120665
|
120909
|
120910
|
120953
|
120954
|
121511
|
121512
|
122033
|
122034
|
122533
|
122535
|
122536
|
122537
|
122538
|
122539
|
122540
|
122685
|
122686
|
122687
|
122688
|
122689
|
122691
|
124010
|
124011
|
125436
|
125472
|
125914
|
125915
|
125916
|
125917
|
127556
|
127557
|
127558
|
127559
|
127560
|
128017
|
128018
|
128019
|
128020
|
128021
|
128022
|
128023
|
128383
|
128384
|
128385
|
131699
|
131700
|
131757
|
131764
|
132373
|
132475
|
132476
|
132477
|
132478
|
132479
|
132751
|
132752
|
132753
|
132754
|
132755