From 3ecec131fc3c36433919bd9358df2cab80afc46d 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 Signed-off-by: John Doe --- .../en/modules/tools/additional-contents.tt | 8 +- tools/additional-contents.pl | 83 ++++++++++--------- 2 files changed, 53 insertions(+), 38 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..a8e8990529 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