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