[Koha-bugs] [Bug 10277] Add C4::Context->IsSuperLibrarian()

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon May 20 21:48:30 CEST 2013


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

Galen Charlton <gmcharlt at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Failed QA
                 CC|                            |gmcharlt at gmail.com

--- Comment #2 from Galen Charlton <gmcharlt at gmail.com> ---
I agree with the notion that the method for checking whether a session has
superlibrarian privileges should be more clear.

The patch is problematic, however:

- I'm pretty sure terminating (via confess) is not the right thing to do if the
userenv isn't set up yet; in particular, this has the potential to break
command-line scripts for no good reason.
- Doing it via confess() without loading the Carp module is wrong regardless.
- A patch that introduces a new C4::Context method but never uses it is
untestable.  It should, at the very least, attempt to replace some of the
opaque userenv flags tests, and ideally should aim to replace them all.  In
other words, if we're going to refactor this, let's refactor this all the way.

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


More information about the Koha-bugs mailing list