Bugzilla – Attachment 148645 Details for
Bug 30418
Add permission and setting for public lists to allow staff with permission to edit contents
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30418: Database changes
Bug-30418-Database-changes.patch (text/plain), 3.14 KB, created by
Kyle M Hall (khall)
on 2023-03-24 10:52:42 UTC
(
hide
)
Description:
Bug 30418: Database changes
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2023-03-24 10:52:42 UTC
Size:
3.14 KB
patch
obsolete
>From f57101e37b88a861e2e369d357e12059d8acb8ca Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Wed, 17 Aug 2022 20:41:52 +1200 >Subject: [PATCH] Bug 30418: Database changes > >Sponsored-by: Catalyst IT, New Zealand > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > installer/data/mysql/atomicupdate/bug_30418.pl | 16 ++++++++++++++++ > installer/data/mysql/kohastructure.sql | 1 + > .../data/mysql/mandatory/userpermissions.sql | 1 + > 3 files changed, 18 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_30418.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_30418.pl b/installer/data/mysql/atomicupdate/bug_30418.pl >new file mode 100755 >index 00000000000..f4c425a08cc >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_30418.pl >@@ -0,0 +1,16 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "30418", >+ description => "Add new list permission and new column to virtualshelves", >+ up => sub { >+ 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?'}); >+ } >+ >+ $dbh->do(q{ INSERT IGNORE INTO permissions (module_bit, code, description) VALUES (20, 'edit_public_list_contents', 'Edit public list contents') }); >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index a3faa37d794..220280bd058 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -5988,6 +5988,7 @@ CREATE TABLE `virtualshelves` ( > `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?', >+ `allow_change_from_permitted_staff` tinyint(1) DEFAULT 0 COMMENT 'can staff with edit_public_list_contents permission 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 7b6955de442..9e5057c6356 100644 >--- a/installer/data/mysql/mandatory/userpermissions.sql >+++ b/installer/data/mysql/mandatory/userpermissions.sql >@@ -137,6 +137,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES > (19, 'configure', 'Configure plugins'), > (20, 'delete_public_lists', 'Delete public lists'), > (20, 'edit_public_lists', 'Edit public lists'), >+ (20, 'edit_public_list_contents', 'Edit public list contents'), > (21, 'edit_templates', 'Create and update club templates'), > (21, 'edit_clubs', 'Create and update clubs'), > (21, 'enroll', 'Enroll patrons in clubs'), >-- >2.30.2
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 30418
:
139696
|
139697
|
139698
|
139699
|
139700
|
139701
|
146363
|
146364
|
146365
|
146366
|
146367
|
146368
|
146374
|
146375
|
146376
|
146377
|
146378
|
146379
|
146609
| 148645 |
148646
|
148647
|
148648
|
148649
|
148650
|
148651
|
148652
|
151249