Bugzilla – Attachment 190282 Details for
Bug 35953
Add delete_any_record cataloguing subpermission
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35953: Rename delete_any_record as delete_bibliographic_records
0002-Bug-35953-Rename-delete_any_record-as-delete_bibliog.patch (text/plain), 6.44 KB, created by
Emmi Takkinen
on 2025-12-08 11:40:51 UTC
(
hide
)
Description:
Bug 35953: Rename delete_any_record as delete_bibliographic_records
Filename:
MIME Type:
Creator:
Emmi Takkinen
Created:
2025-12-08 11:40:51 UTC
Size:
6.44 KB
patch
obsolete
>From ece1d1414308d86b146b54221e309b284500e18f Mon Sep 17 00:00:00 2001 >From: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> >Date: Fri, 5 Dec 2025 11:12:13 +0200 >Subject: [PATCH 2/3] Bug 35953: Rename delete_any_record as > delete_bibliographic_records > >Rename new permission for deleting bibliographic records as >delete_any_record. Also rename atomicupdate file and update it to >follow current skeleton.pl file example. > >To test: >1. Apply this patch. >2. Run updatedatabase.pl. >=> Confirm this new permission was added to Koha. >3. Follow test plan from previous patch. >=> Confirm everything works as described. > >Sponsored by: Koha-Suomi Oy >--- > .../data/mysql/atomicupdate/bug_35953.pl | 19 +++++++++++++++++++ > ...53_-_add_delete_any_record_permission.perl | 6 ------ > .../data/mysql/mandatory/userpermissions.sql | 2 +- > .../prog/en/includes/cat-toolbar.inc | 6 +++--- > .../prog/en/includes/permissions.inc | 5 +++-- > 5 files changed, 26 insertions(+), 12 deletions(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_35953.pl > delete mode 100644 installer/data/mysql/atomicupdate/bug_35953_-_add_delete_any_record_permission.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_35953.pl b/installer/data/mysql/atomicupdate/bug_35953.pl >new file mode 100755 >index 0000000000..535d7cc600 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_35953.pl >@@ -0,0 +1,19 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_success say_info); >+ >+return { >+ bug_number => "35953", >+ description => "Add new permission delete_bibliographic_records", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ $dbh->do( >+ q{INSERT IGNORE INTO permissions (module_bit, code, description) VALUES (9, 'delete_bibliographic_records', 'Delete bibliographic records from catalogue')} >+ ); >+ >+ say $out "Added new permission delete_bibliographic_records"; >+ >+ say $out "Add new permission delete_bibliographic_records for patrons"; >+ }, >+}; >diff --git a/installer/data/mysql/atomicupdate/bug_35953_-_add_delete_any_record_permission.perl b/installer/data/mysql/atomicupdate/bug_35953_-_add_delete_any_record_permission.perl >deleted file mode 100644 >index 6ce64928b4..0000000000 >--- a/installer/data/mysql/atomicupdate/bug_35953_-_add_delete_any_record_permission.perl >+++ /dev/null >@@ -1,6 +0,0 @@ >-$DBversion = 'XXX'; >-if( CheckVersion( $DBversion ) ) { >- $dbh->do(q{INSERT IGNORE INTO permissions (module_bit, code, description) VALUES (9, 'delete_any_record', 'Delete any existing record')}); >- >- NewVersion( $DBversion, undef, "Add delete_any_record user permission" ); >-} >diff --git a/installer/data/mysql/mandatory/userpermissions.sql b/installer/data/mysql/mandatory/userpermissions.sql >index 47483081df..a94cfb51c2 100644 >--- a/installer/data/mysql/mandatory/userpermissions.sql >+++ b/installer/data/mysql/mandatory/userpermissions.sql >@@ -65,7 +65,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES > ( 9, 'delete_all_items', 'Delete all items at once'), > ( 9, 'manage_item_groups', 'Create, update and delete item groups, add or remove items from a item groups'), > ( 9, 'manage_item_editor_templates', 'Update and delete item editor template owned by others'), >- ( 9, 'delete_any_record', 'Delete any existing record'), >+ ( 9, 'delete_catalogue', 'Delete any existing record'), > ( 9, 'edit_any_item', 'Edit any item regardless of home library'), > ( 9, 'edit_locked_records', 'Edit locked records'), > ( 9, 'set_record_sources', 'Set record source'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >index 3bb87c2c6c..c36b8f6e33 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc >@@ -128,7 +128,7 @@ > > [% IF CAN_user_editcatalogue_edit_catalogue or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) %] > [% IF ( count ) %] >- [% IF CAN_user_editcatalogue_delete_any_record %] >+ [% IF CAN_user_editcatalogue_delete_bibliographic_records %] > <li > data-bs-toggle="tooltip" > data-bs-placement="left" >@@ -138,7 +138,7 @@ > </li> > [% END %] > [% ELSIF ( biblio.subscriptions.count ) %] >- [% IF CAN_user_editcatalogue_delete_any_record %] >+ [% IF CAN_user_editcatalogue_delete_bibliographic_records %] > [%- SET subscriptions_count = biblio.subscriptions.count -%] > <li > data-bs-toggle="tooltip" >@@ -149,7 +149,7 @@ > </li> > [% END %] > [% ELSE %] >- [% IF CAN_user_editcatalogue_delete_any_record %] >+ [% IF CAN_user_editcatalogue_delete_bibliographic_records %] > <li> > <form action="/cgi-bin/koha/cataloguing/addbiblio.pl" method="post"> > [% INCLUDE 'csrf-token.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >index 65a598b856..fce42d0ca2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc >@@ -293,8 +293,9 @@ > [%- CASE 'fast_cataloging' -%] > <span class="sub_permission fast_cataloging_subpermission"> Fast cataloging </span> > <span class="permissioncode">([% name | html %])</span> >- [%- CASE 'delete_any_record' -%] >- <span class="sub_permission delete_any_record_subpermission"> Delete any existing record </span> >+ [%- CASE 'delete_bibliographic_records' -%] >+ <span class="sub_permission delete_bibliographic_records_subpermission"> Delete bibliographic records from catalogue </span> >+ <span class="permissioncode">([% name | html %])</span> > [%- CASE 'manage_item_groups' -%] > <span class="sub_permission manage_item_groups_subpermission"> Create, update and delete item groups, add or remove items from an item group </span> > <span class="permissioncode">([% name | html %])</span> >-- >2.34.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 35953
:
161720
|
161859
|
162129
|
162402
|
190281
| 190282 |
190283