From 3a284e126589d467f61f6bc3879b1af50216963f Mon Sep 17 00:00:00 2001 From: Hammat Wele Date: Mon, 28 Aug 2023 17:21:44 +0000 Subject: [PATCH] Bug 34631: Independentbranches - Non-superuser should not be able to write Additional contents for other branches When syspref Independentbranches is enabled Non-superuser should not be able to write Additional contents for other branches To reproduce: 1- Connect to staff interface as superlibrarian 2- Enable IndependentBranches preference 3- Go to Tools -> HTML customizations 4- Crete an additional content for all libraries 5- Create or edit a borrower 5-1- Set permission for the borrower - catalogue - edit_additional_contents 4- Log in to the staff interface with the non-superlibrarian staff user 5- Go to Tools -> HTML customizations --> you can delete or edit the additional contents created by superlibrarian for All libraries 6- Click on New entry --> you can add additional content for other branches 7- Apply the patch 8- Repeat step 5 --> you cannot delete or edit the additional contents create by superlibrarian for All libraries 9- Repeat step 6 --> you cannot add additional content for other branches 10- submit the form --> the branch of the created additional content is the current user branch --- .../prog/en/modules/tools/additional-contents.tt | 6 ++++++ tools/additional-contents.pl | 12 +++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt index 2a7ff46f7b..c811e35ddd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt @@ -239,6 +239,7 @@ [% INCLUDE 'html-customization-help.inc' %] + [% UNLESS my_branch %]
  • + [% END %] [% UNLESS languages.size %]
  • [% IF category == 'news' %] @@ -404,7 +406,9 @@ [% SET default_localization = c.default_localization %] [% IF ( c.is_expired ) %][% ELSE %][% END %] + [% UNLESS ( my_branch && my_branch != c.branchcode ) %] + [% END %] [% IF c.category == 'news' || c.category == 'pages' %] @@ -460,6 +464,7 @@ + [% UNLESS ( my_branch && my_branch != c.branchcode ) %]
    Edit