[Koha-bugs] [Bug 27345] C4::Auth::get_template_and_user is missing some permissions for superlibrarian

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jan 5 23:46:20 CET 2021


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

David Cook <dcook at prosentient.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dcook at prosentient.com.au

--- Comment #2 from David Cook <dcook at prosentient.com.au> ---
This could actually be a good opportunity to do some refactoring...

If you go to
https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=26791&attachment=113660
and click "Auth.pm", you'll see a function called "get_authz_from_flags".

That could be further optimized by fetching the permissions from userflags (as
you note) to dynamically make sure that the superlibrarian has all the right
permissions.

By the way, if we refactor it along the lines of what I've done on Bug 26791,
we could add unit tests too. 

Originally I wanted to refactor C4::Auth::get_template_and_user, but I figured
there was no hope doing it alone. But if you're interested in proving it, I'm
happy to work with you.

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


More information about the Koha-bugs mailing list