[Bug 25858] New: Borrower permissions are broken by update from bug 22868
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25858 Bug ID: 25858 Summary: Borrower permissions are broken by update from bug 22868 Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: blocker Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com The update in bug 22868 flips bit 12 in flags on, however, it was backported and there is no check that the flag is off. A borrower who had bit 11 will now have 4096 added twice which will break their permissions -- 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=25858 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |22868 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22868 [Bug 22868] Circulation staff with suggestions_manage can have access to acquisition data -- 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=25858 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25858 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 106240 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106240&action=edit Bug 25858: Don't attempt to set flag if already set -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25858 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25858 didier <didier.gautheron@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |didier.gautheron@biblibre.c | |om --- Comment #2 from didier <didier.gautheron@biblibre.com> --- Hi Why not use & | and ^ ? UPDATE borrowers SET flags = flags | (1<<12) WHERE flags & (1 << 11) Regards Didier -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25858 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P1 - high --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to didier from comment #2)
Hi
Why not use & | and ^ ?
UPDATE borrowers SET flags = flags | (1<<12) WHERE flags & (1 << 11)
Regards Didier
That is much more concise, I am not sure if it is clearer, but I am happy to have either solution, we just need to get this fixed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25858 didier <didier.gautheron@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25858 didier <didier.gautheron@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106240|0 |1 is obsolete| | --- Comment #4 from didier <didier.gautheron@biblibre.com> --- Created attachment 106282 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106282&action=edit Bug 25858: Don't attempt to set flag if already set Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25858 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #5 from Julian Maurice <julian.maurice@biblibre.com> --- (In reply to Nick Clemens from comment #3)
(In reply to didier from comment #2)
Hi
Why not use & | and ^ ?
UPDATE borrowers SET flags = flags | (1<<12) WHERE flags & (1 << 11)
Regards Didier
That is much more concise, I am not sure if it is clearer, but I am happy to have either solution, we just need to get this fixed
I confirm both solutions work, but in my opinion Didier's solution is more clear about what the intention is. I'll provide a followup -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25858 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #106282|0 |1 is obsolete| | --- Comment #6 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 106314 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106314&action=edit Bug 25858: Don't attempt to set flag if already set Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25858 --- Comment #7 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 106315 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=106315&action=edit Bug 25858: Use bitwise OR for setting a bit in borrowers.flag Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Thanks-to: Didier Gautheron <didier.gautheron@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25858 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25858 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Looks like it is impossible to add a new update DB entry to fix this problem :-/ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25858 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25858 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25858 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|20.11.00 |20.11.00, 20.05.02 released in| | Status|Pushed to master |Pushed to stable CC| |lucas@bywatersolutions.com --- Comment #10 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 20.05.x for 20.05.02 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25858 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aleisha@catalyst.net.nz Status|Pushed to stable |Pushed to oldstable Version(s)|20.11.00, 20.05.02 |20.11.00, 20.05.02, released in| |19.11.08 --- Comment #11 from Aleisha Amohia <aleisha@catalyst.net.nz> --- backported to 19.11.x for 19.11.08 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25858 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Status|Pushed to oldstable |Pushed to oldoldstable Version(s)|20.11.00, 20.05.02, |20.11.00, 20.05.02, released in|19.11.08 |19.11.08, 19.05.13 --- Comment #12 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Backported to 19.05.x branch for 19.05.13 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org