Bugzilla – Attachment 186913 Details for
Bug 39142
Add debug permission to allow user to toggle JS and CSS customizations on/off
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39142: Add debug permission
Bug-39142-Add-debug-permission.patch (text/plain), 2.31 KB, created by
Martin Renvoize (ashimema)
on 2025-09-25 10:53:44 UTC
(
hide
)
Description:
Bug 39142: Add debug permission
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-09-25 10:53:44 UTC
Size:
2.31 KB
patch
obsolete
>From 66aa19120c6e58fcc9063fa1b7382baeb799aee9 Mon Sep 17 00:00:00 2001 >From: Imani Thomas <imani.thomas@bywatersolutions.com> >Date: Fri, 14 Feb 2025 21:03:23 +0000 >Subject: [PATCH] Bug 39142: Add debug permission > >This patch adds the database foundation for the debug permission feature: >- Creates bit 31 in userflags table for 'debug' permission >- Updates mandatory userflags.sql for fresh installations >- Provides atomic update script for existing installations > >The debug permission will allow authorized users to access debugging >tools for toggling JavaScript and CSS customizations. > >Signed-off-by: Lari Strand <lari.strand@koha-suomi.fi> >Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >--- > .../data/mysql/atomicupdate/Bug_39142.pl | 20 +++++++++++++++++++ > installer/data/mysql/mandatory/userflags.sql | 3 ++- > 2 files changed, 22 insertions(+), 1 deletion(-) > create mode 100755 installer/data/mysql/atomicupdate/Bug_39142.pl > >diff --git a/installer/data/mysql/atomicupdate/Bug_39142.pl b/installer/data/mysql/atomicupdate/Bug_39142.pl >new file mode 100755 >index 00000000000..7dd68de46da >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/Bug_39142.pl >@@ -0,0 +1,20 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_success say_info); >+ >+return { >+ bug_number => "39142", >+ description => "Adding a Debug User permission", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ $dbh->do( >+ q{ >+ INSERT IGNORE INTO userflags (bit, flag, flagdesc, defaulton) >+ VALUES (31, 'debug', 'Show Debug Interface', 0) >+ } >+ ); >+ >+ say $out "Added new permission 'Debug'"; >+ }, >+}; >diff --git a/installer/data/mysql/mandatory/userflags.sql b/installer/data/mysql/mandatory/userflags.sql >index 8e9fad25260..45e552d6f81 100644 >--- a/installer/data/mysql/mandatory/userflags.sql >+++ b/installer/data/mysql/mandatory/userflags.sql >@@ -27,5 +27,6 @@ INSERT INTO userflags (bit, flag, flagdesc, defaulton) VALUES > (27, 'recalls', 'Recalls', 0), > (28, 'erm', 'Manage electronic resources', 0), > (29, 'loggedinlibrary', 'Change logged in library', 0), >-(30, 'preservation', 'Preservation module', 0) >+(30, 'preservation', 'Preservation module', 0), >+(31, 'debug', 'Show Debug Interface', 0) > ; >-- >2.51.0
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 39142
:
178123
|
178294
|
178481
|
178482
|
183392
|
183393
| 186913 |
186914
|
186915
|
186916
|
187061