[Koha-bugs] [Bug 30700] Patrons who can log into staff client should be able to change their own password

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon May 23 02:11:35 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30700

--- Comment #14 from David Cook <dcook at prosentient.com.au> ---
(In reply to Owen Leonard from comment #13)
> I don't understand what's going on here, which may just be me:
> 
> if ( !$patron->has_permission({ borrowers => 'edit_borrowers' }) ) {
>     print $input->redirect("/cgi-bin/koha/mainpage.pl");
> }
> 
> But when I change a patron's password when logged in as a superlibrarian I'm
> redirected to the main page rather than back to their account.

Looks like Koha::Patron->has_permission uses C4::Auth::haspermission, which has
this line:

return $flags if $flags->{superlibrarian};

So if you're a superlibrarian then that should be returning true.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list