[Bug 34631] New: Independentbranches : Non-superuser should not be able to write Additional contents for other branches
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Bug ID: 34631 Summary: Independentbranches : Non-superuser should not be able to write Additional contents for other branches Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Tools Assignee: koha-bugs@lists.koha-community.org Reporter: hammat.wele@inlibro.com QA Contact: testopia@bugs.koha-community.org 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 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |hammat.wele@inlibro.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com, | |philippe.blouin@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Independentbranches : |Independentbranches - |Non-superuser should not be |Non-superuser should not be |able to write Additional |able to write Additional |contents for other branches |contents for other branches -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 --- Comment #1 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 154889 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154889&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #154889|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 --- Comment #2 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 154890 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154890&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Myka Kennedy Stephens <mkstephens@fosgail.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |mkstephens@fosgail.org --- Comment #3 from Myka Kennedy Stephens <mkstephens@fosgail.org> --- Attempted to test using git bz with Koha Testing Docker. Received following error: Applying: Bug 34631: Independentbranches - Non-superuser should not be able to write Additional contents for other branches Using index info to reconstruct a base tree... M koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt M tools/additional-contents.pl Falling back to patching base and 3-way merge... Auto-merging tools/additional-contents.pl CONFLICT (content): Merge conflict in tools/additional-contents.pl Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt error: Failed to merge in the changes. Patch failed at 0001 Bug 34631: Independentbranches - Non-superuser should not be able to write Additional contents for other branches -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Matthias Le Gac <matthias.le-gac@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Matthias Le Gac <matthias.le-gac@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #154890|0 |1 is obsolete| | --- Comment #4 from Matthias Le Gac <matthias.le-gac@inlibro.com> --- Created attachment 162787 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162787&action=edit Bug 34631: Independentbranches - rebase to master 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Matthias Le Gac <matthias.le-gac@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matthias.le-gac@inlibro.com --- Comment #5 from Matthias Le Gac <matthias.le-gac@inlibro.com> --- rebase to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Myka Kennedy Stephens <mkstephens@fosgail.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply --- Comment #6 from Myka Kennedy Stephens <mkstephens@fosgail.org> --- Applied patch and received an error when returning to the HTML Customizations tool in the non-superlibrarian login (additional-contents.pl) A PDF of the full error trace is available here: https://drive.google.com/file/d/1GNaNWN-sMIKQcYvdns5i5406qZ2iGw23/view?usp=s... The same error persists across News and Pages for both a superlibrarian login and a non-superlibrarian login. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Matthias Le Gac <matthias.le-gac@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 --- Comment #7 from Matthias Le Gac <matthias.le-gac@inlibro.com> --- Created attachment 162788 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162788&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 --- Comment #8 from Myka Kennedy Stephens <mkstephens@fosgail.org> --- @Matthias, I'm still getting the same error when applying. Git bz applied both patches that are attached here. Either one of them is still producing the error or I'm doing something wrong with Koha Testing Docker. Please advise. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |lucas@bywatersolutions.com --- Comment #9 from Lucas Gass <lucas@bywatersolutions.com> --- Matthias, your patch sets now include merge markers. Please use the QA tool! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Matthias Le Gac <matthias.le-gac@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #154890|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Matthias Le Gac <matthias.le-gac@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162787|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Matthias Le Gac <matthias.le-gac@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162788|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Matthias Le Gac <matthias.le-gac@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #154889|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Matthias Le Gac <matthias.le-gac@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #154889|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Matthias Le Gac <matthias.le-gac@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Matthias Le Gac <matthias.le-gac@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #154890|0 |1 is obsolete| | --- Comment #10 from Matthias Le Gac <matthias.le-gac@inlibro.com> --- Created attachment 162856 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162856&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 --- Comment #11 from Matthias Le Gac <matthias.le-gac@inlibro.com> --- I think it's good now to test sorry for the trouble I've caused by trying to rebase -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Myka Kennedy Stephens <mkstephens@fosgail.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply --- Comment #12 from Myka Kennedy Stephens <mkstephens@fosgail.org> --- Different error, this time when attempting to apply the patch using git bz: Applying: Bug 34631: Independentbranches - Non-superuser should not be able to write Additional contents for other branches error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt). error: could not build fake ancestor Patch failed at 0001 Bug 34631: Independentbranches - Non-superuser should not be able to write Additional contents for other branches -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 --- Comment #13 from Matthias Le Gac <matthias.le-gac@inlibro.com> --- Bug 34631 - Independentbranches - Non-superuser should not be able to write Additional contents for other branches 162856 - Bug 34631: Independentbranches - Non-superuser should not be able to write Additional contents for other branches Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 34631: Independentbranches - Non-superuser should not be able to write Additional contents for other branches I have no problem to apply the patch, I don't understand your problem. Your master is up to date ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 --- Comment #14 from Myka Kennedy Stephens <mkstephens@fosgail.org> --- Matthias: I don't understand it either. I tried again just now. Fresh boot of Koha Testing Docker, fresh git pull, and an extra git reset just for extra measure. When I did the hard reset it said: HEAD is now at fee4368cd8 Bug 35930: Add guards for plugins_enabled Applying the patch with git bz, I get the same errors as yesterday: error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt). error: could not build fake ancestor I was able to test and sign off on another patch for another bug yesterday, so I'm fairly certain the issue is with this patch and not my setup. I'm sorry I don't have any more insights than that. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff --- Comment #15 from Blou <philippe.blouin@inlibro.com> --- Myka, Bug 35930 has been on the stack for a while. My grep tells me it's number 486 on the master stack. It's possible to test plenty of issue with an old master, but when it fails, it fails. The issue right now seems with your setup, I'm sorry. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Myka Kennedy Stephens <mkstephens@fosgail.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Myka Kennedy Stephens <mkstephens@fosgail.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162856|0 |1 is obsolete| | --- Comment #16 from Myka Kennedy Stephens <mkstephens@fosgail.org> --- Created attachment 162929 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162929&action=edit 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: Myka Kennedy Stephens <mkstephens@fosgail.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 --- Comment #17 from Myka Kennedy Stephens <mkstephens@fosgail.org> --- I've been doing git pulls outside of Koha testing docker, which was making it look like my Koha repository was updating, but I guess it wasn't. I did a git pull from within the ktd shell, applied the patch, and then it worked! Applying the patch has the desired effect that a non-superuser from another branch has the option to preview HTML content but the edit and delete buttons are hidden from content for other branches and all libraries. After signing-off, I am having some trouble with steps 9 and 10 of the test plan. After trying to save new content with the limited-access user, I get the following error: Template process failed: undef error - The method Koha::AdditionalContent->idnew is not covered by tests! This error persists to the superuser login. When I do a hard reset to master, the error goes away and I can see the content that I attempted to add and save before I got the error. Hoping QA or a second tester can look into this further. I'm leaving it as signed off, but please change if there's a more appropriate status. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #18 from Blou <philippe.blouin@inlibro.com> --- Well, I'll fail it myself :-P Matthias, the code for additional-contents.pl has been all reformated, like you passed it in perltidy. It makes it very hard to see the actual modifications. Please resend the patch with no extra formating, please (beside the lines with actual changes). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Matthias Le Gac <matthias.le-gac@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162929|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Matthias Le Gac <matthias.le-gac@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #154890|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Matthias Le Gac <matthias.le-gac@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Matthias Le Gac <matthias.le-gac@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #154890|0 |1 is obsolete| | --- Comment #19 from Matthias Le Gac <matthias.le-gac@inlibro.com> --- Created attachment 162972 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162972&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 --- Comment #20 from Matthias Le Gac <matthias.le-gac@inlibro.com> --- Sorry for the confusion, I was working on an old master's DB, so I hadn't seen the change of a field in the DB that broke everything. Normally the problem is solved I managed to make the test plan. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Myka Kennedy Stephens <mkstephens@fosgail.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Myka Kennedy Stephens <mkstephens@fosgail.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162972|0 |1 is obsolete| | --- Comment #21 from Myka Kennedy Stephens <mkstephens@fosgail.org> --- Created attachment 162995 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162995&action=edit 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: Myka Kennedy Stephens <mkstephens@fosgail.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 --- Comment #22 from Myka Kennedy Stephens <mkstephens@fosgail.org> --- This patch works beautifully! I completed the test plan and everything worked as expected this time, very smooth. With the patch applied, the non-superlibrarian staff user can preview HTML customizations for all libraries and for other branches -- the edit and delete buttons are suppressed. This user can also edit existing content for their branch. When creating new content, the drop-down to select all libraries or a particular branch is suppressed. The user can create new content successfully and when returned to the table of all HTML customizations, the new content appears under the user's branch and has the edit and delete buttons available. Great work! Glad all the back-and-forth finally paid off and it sounds like we both learned a little in the process. :-) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #23 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Signed-off-by: John Doe <you@example.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 --- Comment #24 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- - my $branchcode = $cgi->param('branchcode') || undef; + my $branchcode = $my_branch ? $my_branch : $cgi->param('branchcode') || undef; This looks odd at least. I am posting on branchcode and we will write to current branch? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 --- Comment #25 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- + [% UNLESS ( my_branch && my_branch != c.branchcode ) %] <input type="checkbox" name="ids" value="[% c.id | html %]" /> + [% END %] Hiding an id based on an unclear condition (my_branch does not represent what we intuitively think that it is). Note that I found one counterargument: tools/letter.pl:our $my_branch = C4::Context->preference("IndependentBranches") && !$staffflags->{'superlibrarian'} -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #26 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- This still needs a bit more attention at both server side and client side. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 --- Comment #27 from Sukhmandeep <sukhmandeep.benipal@inLibro.com> --- Created attachment 172231 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172231&action=edit Bug 34631: (Follow up) Changed variable name Same test plan as before just changed variable name for clarity. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Sukhmandeep <sukhmandeep.benipal@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sukhmandeep.benipal@inLibro | |.com --- Comment #28 from Sukhmandeep <sukhmandeep.benipal@inLibro.com> --- The logic for the branchcode has changed slightly, and it seems to be the right approach. You can access the staff interface with two roles: superlibrarian or staff. Previously, there were no checks, allowing unrestricted editing and deleting. The main issue was with variable names, which weren’t intuitive. To clarify, the branchcode is linked to the library field (Tools -> HTML customization -> new entry). Now, superlibrarians have access to all libraries, while staff can only access their own. The variable my_branch indicates whether the user is a staff, adjusting the interface accordingly. I've renamed it for clarity, but that appears to be the only necessary change at this point. Regarding the hidden ID of the checkbox, it works similarly: if you're staff and your library is different, there’s no checkbox, as it allows deletion of selected items. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Sukhmandeep <sukhmandeep.benipal@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162995|0 |1 is obsolete| | --- Comment #29 from David Nind <david@davidnind.com> --- Created attachment 175973 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175973&action=edit 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 <you@example.com> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172231|0 |1 is obsolete| | --- Comment #30 from David Nind <david@davidnind.com> --- Created attachment 175974 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175974&action=edit Bug 34631: (Follow up) Changed variable name Same test plan as before just changed variable name for clarity. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Text to go in the| |This fixes additional release notes| |contents when the | |IndependentBranches system | |preference is enabled - | |staff that are not super | |librarians can now only | |add, edit, and delete | |additional contents for | |their library (Tools > | |Additional contents (news, | |HTML customizations, | |pages). Previously, they | |could edit additional | |contents for other | |libraries and content added | |by super librarians. | | | | w -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|This fixes additional |This fixes additional release notes|contents when the |contents when the |IndependentBranches system |IndependentBranches system |preference is enabled - |preference is enabled - |staff that are not super |staff that are not super |librarians can now only |librarians can now only |add, edit, and delete |add, edit, and delete |additional contents for |additional contents for |their library (Tools > |their library (Tools > |Additional contents (news, |Additional contents (news, |HTML customizations, |HTML customizations, |pages). Previously, they |pages). Previously, they |could edit additional |could edit additional |contents for other |contents for other |libraries and content added |libraries and content added |by super librarians. |by super librarians. | | | w | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #175973|0 |1 is obsolete| | --- Comment #31 from David Nind <david@davidnind.com> --- Created attachment 175975 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175975&action=edit 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: Myka Kennedy Stephens <mkstephens@fosgail.org> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #175974|0 |1 is obsolete| | --- Comment #32 from David Nind <david@davidnind.com> --- Created attachment 175976 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=175976&action=edit Bug 34631: (Follow up) Changed variable name Same test plan as before just changed variable name for clarity. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 --- Comment #33 from David Nind <david@davidnind.com> --- I fixed the original commit message sign off signature (changed John Doe to Myka Kennedy Stephens). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|m.de.rooy@rijksmuseum.nl |testopia@bugs.koha-communit | |y.org --- Comment #34 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- This feels like a workaround to me. Harder to maintain code. There should be another way to do this better. I wont pass QA but leave room for another QA point of view. No coding guideline to FQA either. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 --- Comment #35 from David Nind <david@davidnind.com> --- Some comments from another IndependentBranches related bug that may be relevant for this bug - bug 38040 comment #13: "... The trend has been to move parts of Independent Branches to more granular system preferences ( IndependentBranchesPatronModifications , IndependentBranchesTransfers ) so maybe we need 'IndependentBranchesReserves'? ...." -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 --- Comment #36 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to David Nind from comment #35)
Some comments from another IndependentBranches related bug that may be relevant for this bug - bug 38040 comment #13:
"... The trend has been to move parts of Independent Branches to more granular system preferences ( IndependentBranchesPatronModifications , IndependentBranchesTransfers ) so maybe we need 'IndependentBranchesReserves'? ...."
And there are also library groups that already does a lot of what independentbranches did, but in a better and more flexible way. It would be nice to be able to get rid of the preference at some point. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |nick@bywatersolutions.com --- Comment #37 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Agreeing with others here - we need a new pref or another way of determining access - this would be a large change of behavior. Additionally, I can still edit additional contents through URL manipulation: http://localhost:8081/cgi-bin/koha/tools/additional-contents.pl?op=add_form&id=7&editmode=wysiwyg It doesn't matter if the id in question belongs to my branch, it will after the edit, but I can still affect them Adding the delete button in manually as well: <input type="checkbox" name="ids" value="2"> Allows me to delete any entry -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #175975|0 |1 is obsolete| | --- Comment #38 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 179859 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=179859&action=edit 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: Myka Kennedy Stephens <mkstephens@fosgail.org> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #175976|0 |1 is obsolete| | --- Comment #39 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 179860 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=179860&action=edit Bug 34631: (Follow up) Changed variable name Same test plan as before just changed variable name for clarity. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #179859|0 |1 is obsolete| | --- Comment #40 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 180602 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180602&action=edit 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: Myka Kennedy Stephens <mkstephens@fosgail.org> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #179860|0 |1 is obsolete| | --- Comment #41 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 180603 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180603&action=edit Bug 34631: (Follow up) Changed variable name Same test plan as before just changed variable name for clarity. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 --- Comment #42 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 180604 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180604&action=edit Bug 34631: Add IndependentBranchesAdditionalcontents preference and some checks into additional-contents.pl 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 and run updatedatabase 8- Enable IndependentBranchesAdditionalcontents preference 9- Repeat step 5 --> you cannot delete or edit the additional contents create by superlibrarian for All libraries even by url manipulation 10- Repeat step 6 --> you cannot add additional content for other branches 11- submit the form --> the branch of the created additional content is the current user branch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@libriotech.no --- Comment #43 from Magnus Enger <magnus@libriotech.no> --- Not sure I understand the state of this bug. There are two signed off patches and one that is not signed off. The one that is not signed off has a very similar test plan to the main patch that is signed off. Should the two signed off patches be obsoleted? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 --- Comment #44 from Hammat wele <hammat.wele@inlibro.com> --- (In reply to Magnus Enger from comment #43)
Not sure I understand the state of this bug. There are two signed off patches and one that is not signed off. The one that is not signed off has a very similar test plan to the main patch that is signed off.
Should the two signed off patches be obsoleted?
Hi Magnus, the one that is not signed off add corrections that is suggested in comment 37, that need to be signed off. I attached a test plan because there is a new preference IndependentBranchesAdditionalcontents, the two first patches should not be obsoleted -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #45 from David Nind <david@davidnind.com> --- This only seems to partially work, if I have tested correctly. I Failed QA because of 4.4 and 4.5 - I can't edit existing items for my specific library, but I can delete it. 1. I only tested with news. 2. Using the superlibrarian (koha), I created two news items: 2.1 One for all libraries 2.2 One for Midway only 3. I changed the permissions for Henry Acevedo. 4. With the patch applied, IndependentBranchesAdditionalcontents = Yes, and logged in as Henry: 4.1 I can't edit or delete the news item for all libraries (as expected) 4.2 I have options to edit and delete the news item for Midway (as expected) 4.3 I can delete the news item for Midway (as expected) 4.4 When I go to edit the news item for Midway, the edit form is not pre-populated with the news item details - the form title is "New news item": . For the Library field, the "All libraries" option is selected . There is no publication date . There are no news item details (title and content) 4.5 If I create a news item: . For the library field, I can choose any library - when I save, it changes the library to Midway . When I edit the news item, the same as 4.4 . If I fill in the fields and save, a new news item is created Suggestion for the system preference description: - Current: Prevent staff (but not superlibrarians) from editing Additional contents in other libraries: - Suggested: Prevent staff (but not superlibrarians) from editing additional contents for other libraries: -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 --- Comment #46 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 184604 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184604&action=edit Bug 34631: (follow-up) Non-superlibrarians should not have the right to select the library -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180602|0 |1 is obsolete| | --- Comment #47 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 185420 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185420&action=edit 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: Myka Kennedy Stephens <mkstephens@fosgail.org> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180603|0 |1 is obsolete| | --- Comment #48 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 185421 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185421&action=edit Bug 34631: (Follow up) Changed variable name Same test plan as before just changed variable name for clarity. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180604|0 |1 is obsolete| | --- Comment #49 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 185422 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185422&action=edit Bug 34631: Add IndependentBranchesAdditionalcontents preference and some checks into additional-contents.pl 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 and run updatedatabase 8- Enable IndependentBranchesAdditionalcontents preference 9- Repeat step 5 --> you cannot delete or edit the additional contents create by superlibrarian for All libraries even by url manipulation 10- Repeat step 6 --> you cannot add additional content for other branches 11- submit the form --> the branch of the created additional content is the current user branch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #184604|0 |1 is obsolete| | --- Comment #50 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 185423 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185423&action=edit Bug 34631: (follow-up) Non-superlibrarians should not have the right to select the library -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 --- Comment #51 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 185424 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185424&action=edit Bug 34631: (follow-up) Tidy additional-contents.tt -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185420|0 |1 is obsolete| | --- Comment #52 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 185442 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185442&action=edit 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: Myka Kennedy Stephens <mkstephens@fosgail.org> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185421|0 |1 is obsolete| | --- Comment #53 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 185443 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185443&action=edit Bug 34631: (Follow up) Changed variable name Same test plan as before just changed variable name for clarity. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185422|0 |1 is obsolete| | --- Comment #54 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 185444 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185444&action=edit Bug 34631: Add IndependentBranchesAdditionalcontents preference and some checks into additional-contents.pl 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 and run updatedatabase 8- Enable IndependentBranchesAdditionalcontents preference 9- Repeat step 5 --> you cannot delete or edit the additional contents create by superlibrarian for All libraries even by url manipulation 10- Repeat step 6 --> you cannot add additional content for other branches 11- submit the form --> the branch of the created additional content is the current user branch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185423|0 |1 is obsolete| | --- Comment #55 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 185445 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185445&action=edit Bug 34631: (follow-up) Non-superlibrarians should not have the right to select the library -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185424|0 |1 is obsolete| | --- Comment #56 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 185446 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185446&action=edit Bug 34631: (follow-up) Tidy additional-contents.tt -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185442|0 |1 is obsolete| | --- Comment #57 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 189553 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189553&action=edit 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: Myka Kennedy Stephens <mkstephens@fosgail.org> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185443|0 |1 is obsolete| | --- Comment #58 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 189554 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189554&action=edit Bug 34631: (Follow up) Changed variable name Same test plan as before just changed variable name for clarity. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185444|0 |1 is obsolete| | --- Comment #59 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 189555 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189555&action=edit Bug 34631: Add IndependentBranchesAdditionalcontents preference and some checks into additional-contents.pl 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 and run updatedatabase 8- Enable IndependentBranchesAdditionalcontents preference 9- Repeat step 5 --> you cannot delete or edit the additional contents create by superlibrarian for All libraries even by url manipulation 10- Repeat step 6 --> you cannot add additional content for other branches 11- submit the form --> the branch of the created additional content is the current user branch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185445|0 |1 is obsolete| | --- Comment #60 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 189556 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189556&action=edit Bug 34631: (follow-up) Non-superlibrarians should not have the right to select the library -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185446|0 |1 is obsolete| | --- Comment #61 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 189557 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189557&action=edit Bug 34631: (follow-up) Tidy additional-contents.tt -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189553|0 |1 is obsolete| | --- Comment #62 from David Nind <david@davidnind.com> --- Created attachment 190870 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190870&action=edit 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: Myka Kennedy Stephens <mkstephens@fosgail.org> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189554|0 |1 is obsolete| | --- Comment #63 from David Nind <david@davidnind.com> --- Created attachment 190871 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190871&action=edit Bug 34631: (Follow up) Changed variable name Same test plan as before just changed variable name for clarity. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189555|0 |1 is obsolete| | --- Comment #64 from David Nind <david@davidnind.com> --- Created attachment 190872 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190872&action=edit Bug 34631: Add IndependentBranchesAdditionalcontents preference and some checks into additional-contents.pl 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 and run updatedatabase 8- Enable IndependentBranchesAdditionalcontents preference 9- Repeat step 5 --> you cannot delete or edit the additional contents create by superlibrarian for All libraries even by url manipulation 10- Repeat step 6 --> you cannot add additional content for other branches 11- submit the form --> the branch of the created additional content is the current user branch Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189556|0 |1 is obsolete| | --- Comment #65 from David Nind <david@davidnind.com> --- Created attachment 190873 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190873&action=edit Bug 34631: (follow-up) Non-superlibrarians should not have the right to select the library Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189557|0 |1 is obsolete| | --- Comment #66 from David Nind <david@davidnind.com> --- Created attachment 190874 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190874&action=edit Bug 34631: (follow-up) Tidy additional-contents.tt Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34631 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #67 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Looking here again. Your perseverance is exemplary btw. Did you see Nicks comment about URL manipulation. What did you do with that? In general this code does not yet look ready for a push. Some observations. [% UNLESS ( my_branch_as_staff && my_branch_as_staff != c.branchcode ) %] I am seeing this construct a few times. An unless with an AND does not always read that easy. Are you sure this is what you mean? The fact that this variable is filled rather complex (see below), makes this check hard to understand. +my $my_branch_as_staff = + C4::Context->preference("IndependentBranchesAdditionalcontents") + && !C4::Context->IsSuperLibrarian() + ? C4::Context->userenv()->{'branch'} + : undef; Variable name is unclear. Do we need a current branch and some additional permission variable ? The not superlibrarian condition looks weird too. If I am superlib, it is false. Should it be pref true OR superlib ? my $additional_content = Koha::AdditionalContents->find($id); + $additional_content = undef + if ( $my_branch_as_staff + && $additional_content + && C4::Context->userenv()->{'branch'} ne $additional_content->branchcode ); This looks suboptimal. You probably could prevent a db hit here in some cases and adjust the search condition otherwise? + if ($my_branch_as_staff) { + @ids = grep { + my $id = $_; + my $additional_content = Koha::AdditionalContents->find($id); + defined $additional_content->branchcode + && $additional_content->branchcode eq C4::Context->userenv()->{'branch'}; + } @ids; + } + if (@ids) { + try { + Koha::Database->new->schema->txn_do( + sub { + my $contents = Koha::AdditionalContents->search( { id => \@ids } ); Suboptimal too. Fetching records twice. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org