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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Imani Thomas 2025-02-14 21:03:23 +00:00 committed by Lucas Gass
parent 94ba3d5344
commit 9eef928712
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
2 changed files with 21 additions and 0 deletions

View File

@ -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 (32, 'debug', 'Show Debug Interface', 0)
}
);
say $out "Added new permission 'Debug'";
},
};

View File

@ -29,4 +29,5 @@ INSERT INTO userflags (bit, flag, flagdesc, defaulton) VALUES
(29, 'loggedinlibrary', 'Change logged in library', 0),
(30, 'preservation', 'Preservation module', 0),
(31, 'sip2', 'SIP2 module', 0)
(32, 'debug', 'Show Debug Interface', 0)
;