[Koha-bugs] [Bug 14437] Refactor C4::Auth::haspermission() to Koha::Object and return better errors.

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jun 23 11:18:19 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14437

--- Comment #1 from Olli-Antti Kivilahti <olli-antti.kivilahti at 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.


More information about the Koha-bugs mailing list