[Bug 14437] New: Refactor C4::Auth::haspermission() to Koha::Object and return errors better.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14437 Bug ID: 14437 Summary: Refactor C4::Auth::haspermission() to Koha::Object and return errors better. Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Authentication Assignee: gmcharlt@gmail.com Reporter: olli-antti.kivilahti@jns.fi QA Contact: testopia@bugs.koha-community.org CC: dpavlin@rot13.org Refactoring haspermission() and improving documentation. Also added a return value unintrusively (in the old context still RETURNS the same result) to tell which permission failed. Modification should have no adverse effects, other than killing the process (by throwing uncaught exceptions) if no valid parameters are given. Depends on Bug 13995 - Proper Exception handling so apply it first. Cannot create unit tests because there is no CRUD interface for permissions. Not even with TestBuilder. TEST PLAN: 1. Find a borrower with only the catalogue-permission. 2. try opening this page cgi-bin/koha/tools/manage-marc-import.pl 3. You get "Permission denied" -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14437 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Refactor |Refactor |C4::Auth::haspermission() |C4::Auth::haspermission() |to Koha::Object and return |to Koha::Object and return |errors better. |better errors. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14437 --- Comment #1 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 40513 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40513&action=edit Bug 14437 - Refactor C4::Auth::haspermission() to Koha::Object and return better errors. Refactoring haspermission() and improving documentation. Also added a return value unintrusively (in the old context still RETURNS the same result) to tell which permission failed. Modification should have no adverse effects, other than killing the process (by throwing uncaught exceptions) if no valid parameters are given. Depends on Buugg 13995 - Proper Exception handling so apply it first. Cannot create unit tests because there is no CRUD interface for permissions. Not even with TestBuilder. TEST PLAN: 1. Find a borrower with only the catalogue-permission. 2. try opening this page cgi-bin/koha/tools/manage-marc-import.pl 3. You get "Permission denied" -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14437 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14437 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40513|0 |1 is obsolete| | --- Comment #2 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 40571 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40571&action=edit Bug 14437 - Refactor C4::Auth::haspermission() to Koha::Object and return better errors. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14437 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |13920 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14437 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40571|0 |1 is obsolete| | --- Comment #3 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 40718 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40718&action=edit Bug 14437 - Refactor C4::Auth::haspermission() to Koha::Object and return better errors. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14437 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |7174 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14437 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40718|0 |1 is obsolete| | --- Comment #4 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 40719 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40719&action=edit Bug 14437 - Refactor C4::Auth::haspermission() to Koha::Object and return better errors. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14437 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m Assignee|gmcharlt@gmail.com |olli-antti.kivilahti@jns.fi -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14437 --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- Comment on attachment 40719 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40719 Bug 14437 - Refactor C4::Auth::haspermission() to Koha::Object and return better errors. Review of attachment 40719: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=14437&attachment=40719) ----------------------------------------------------------------- ::: C4/Auth.pm @@ +38,5 @@
use List::MoreUtils qw/ any /; use Encode qw( encode is_utf8);
+use Koha::Exception::BadParameter; +use Koha::Exception::UnknownObject;
So should depend on bug 13995. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14437 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |13995 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14437 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|Needs Signoff |RESOLVED --- Comment #6 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- This Bug is deprecated because of Bug 14540. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14437 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|7174 | Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7174 [Bug 7174] Authentication rewriting -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org