[Bug 6885] New: Superlibrarian users can't delete items from another library when IndependantBranches
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 Bug #: 6885 Summary: Superlibrarian users can't delete items from another library when IndependantBranches Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Platform: All OS/Version: All Status: NEW Severity: normal Priority: P5 Component: Cataloging AssignedTo: gmcharlt@gmail.com ReportedBy: frederic@tamil.fr QAContact: koha-bugs@lists.koha-community.org CC: ian.walls@bywatersolutions.com When IndependantBranches syspref is enabled, a 'regular' user can only delete items belonging to his/her library. But a superlibrarian should have the permission to delete items from all libraries. He can't for the time being. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|gmcharlt@gmail.com |frederic@tamil.fr -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 --- Comment #1 from Frédéric Demians <frederic@tamil.fr> 2011-09-19 18:12:26 UTC --- Created attachment 5460 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5460 Proposed patch How to test? - On a multi-libraries Koha, activate IndependantBranches - Log in with a superlibrarian user - Find a biblio with one item from another library than the user home library - Click on Edit > Edit Items - On the list of items, all lines have Delete link - If you try to delete an item from another library than the user home library, deletion will fail. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent Patch Status|--- |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 Michael Hafen <mdhafen@tech.washk12.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mdhafen@tech.washk12.org --- Comment #2 from Michael Hafen <mdhafen@tech.washk12.org> 2011-09-20 15:26:06 UTC --- Looking at the patch (on the mailing list) userenv->{flags} != 1 isn't the best way to check for superlibrarian status. I think that userenv->{flags} %2 != 1 is the preferred way. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #3 from Julian Maurice <julian.maurice@biblibre.com> 2011-10-07 13:25:19 UTC --- I confirm that, if user has more than the superlibrarian permission checked, userenv->{flags} will be greater than 1 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #5460|0 |1 is obsolete| | --- Comment #4 from Frédéric Demians <frederic@tamil.fr> 2011-10-07 13:40:06 UTC --- Created attachment 5771 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5771 Amende proposed patch Corrected patch. Thanks Mikeal and Julian. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #5771|0 |1 is obsolete| | --- Comment #5 from Owen Leonard <oleonard@myacpl.org> 2011-10-11 14:34:58 UTC --- Created attachment 5839 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5839 Signed-off patch I confirmed the buggy behavior following the steps provided. After applying the patch I was able to delete items from another branch successfully. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Signed Off -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #5839|0 |1 is obsolete| | --- Comment #6 from Paul Poulain <paul.poulain@biblibre.com> 2011-10-12 15:07:50 UTC --- Created attachment 5857 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5857 Bug 6885 Allow superlib to delete items from any library When IndependantBranches syspref is enabled, a 'regular' user can only delete items belonging to his/her library. But a superlibrarian should have the permission to delete items from all libraries. He can't for the time being. This is fix by this patch. How to test? - On a multi-libraries Koha, activate IndependantBranches - Log in with a superlibrarian user - Find a biblio with one item from another library than the user home library - Click on Edit > Edit Items - On the list of items, all lines have Delete link - If you try to delete an item from another library than the user home library, deletion will fail. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.poulain@biblibre.com Patch Status|Signed Off |Passed QA --- Comment #7 from Paul Poulain <paul.poulain@biblibre.com> 2011-10-12 15:08:54 UTC --- QA comment * good description * small fix, written like everywhere in the code to check against superlibrarian permission => passed QA -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 --- Comment #8 from Ian Walls <ian.walls@bywatersolutions.com> 2011-10-12 15:30:49 UTC --- This will work to add the permissions check, yes, and it is consistent with how superlibrarian is tested in other parts of the code. This method (modulo 2) is not universal, however, and another bug report should be filed to apply a uniform checking methodology across the entire codebase. I recommend bitwise AND. Passed QA. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 --- Comment #9 from Frédéric Demians <frederic@tamil.fr> 2011-10-12 15:55:18 UTC --- (In reply to comment #8)
This will work to add the permissions check, yes, and it is consistent with how superlibrarian is tested in other parts of the code. This method (modulo 2) is not universal, however, and another bug report should be filed to apply a uniform checking methodology across the entire codebase. I recommend bitwise AND.
Yes, you're correct, and there are a lot of locations in Koha where permissions flags are not properly tested. A 'grep -R flags' show them. The superlibrarian permission should be tested like this: if $flags & 1 cataloguing: $flags & 4 and so on... -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Patch Status|Passed QA |Patch Pushed --- Comment #10 from Chris Cormack <chris@bigballofwax.co.nz> 2011-10-13 02:55:59 UTC --- No changes to templates, pushed -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nengard@gmail.com --- Comment #11 from Nicole C. Engard <nengard@gmail.com> 2011-11-01 15:46:51 UTC --- I just tested this on Koha 3.6 and was unable to delete and item even though I was logged in as a superlibrarian ... can anyone confirm that this is or isn't fixed? -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 --- Comment #12 from Owen Leonard <oleonard@myacpl.org> 2011-11-01 16:33:22 UTC --- (In reply to comment #11)
I just tested this on Koha 3.6 and was unable to delete and item even though I was logged in as a superlibrarian
Unable to delete because the link wasn't there, or because of an error? It's working for me. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 --- Comment #13 from Nicole C. Engard <nengard@gmail.com> 2011-11-02 00:27:57 UTC --- I clicked DELETE (the link was there) and then it said I couldn't delete because it wasn't at my branch. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 --- Comment #14 from Frédéric Demians <frederic@tamil.fr> 2011-11-02 07:25:24 UTC --- The patch is included in HEAD/3.6. If you are on a git install, you can check: git log --grep="Bug 6885" -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 --- Comment #15 from Frédéric Demians <frederic@tamil.fr> 2012-01-04 17:13:39 UTC --- This bug is back in HEAD/3.6.x. This is due to a follow up patch which commit id is: cdd798ec3216c6019adccc40935e93736ce4dc3b The condition has to be inverted. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 --- Comment #16 from Frédéric Demians <frederic@tamil.fr> 2012-01-04 17:15:18 UTC --- Created attachment 7039 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7039 Follow up patch -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Patch Pushed |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #5857|0 |1 is obsolete| | Attachment #7039|0 |1 is obsolete| | --- Comment #17 from Chris Cormack <chris@bigballofwax.co.nz> 2012-01-05 02:30:48 UTC --- Created attachment 7046 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7046 Bug 6885 Follow up patch, invert tested condition Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Not sure the brackets are nessecary, but I think I remember learning bitwise operators have a lower priority than other relational operators so wanted to make sure we notted the result of the bitwise and, not the flag -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #7046|0 |1 is obsolete| | --- Comment #18 from Chris Cormack <chris@bigballofwax.co.nz> 2012-01-05 02:31:29 UTC --- Created attachment 7047 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7047 Bug 6885 Follow up patch, invert tested condition Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Not sure the brackets are nessecary, but I think I remember learning bitwise operators have a lower priority than other relational operators so wanted to make sure we notted the result of the bitwise and, not the flag -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Signed Off -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 --- Comment #19 from Frédéric Demians <frederic@tamil.fr> 2012-01-05 08:53:30 UTC ---
Not sure the brackets are nessecary, but I think I remember learning bitwise operators have a lower priority than other relational operators so wanted to make sure we notted the result of the bitwise and, not the flag
That's a wise decision. Thanks. And it adds readability. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #20 from Paul Poulain <paul.poulain@biblibre.com> 2012-01-17 17:06:54 UTC --- QA comment: tiny patch, nothing to say (except the condition is a little bit hard to read now, but could if be different ? I'm not sure) -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master Version|master |rel_3_6 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|PATCH-Sent (DO NOT USE) |P3 Status|Pushed to Master |Pushed to Stable CC| |katrin.fischer@bsz-bw.de -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6885 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org