Bug 10277: (follow-up) if no userenv is set, act like a superlibrarian
authorGalen Charlton <gmc@esilibrary.com>
Mon, 30 Dec 2013 18:50:04 +0000 (18:50 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 30 Dec 2013 18:50:04 +0000 (18:50 +0000)
commit71b7d5629878bd5616dbb1db263a8fd943d3f7b9
tree64e9b5a688c57f36fbbba13e00e959ea36f01ef4
parent87564a834b885188ee0e6fde800775b403d2e1c0
Bug 10277: (follow-up) if no userenv is set, act like a superlibrarian

This patch fixes an error caught by t/db_dependent/Acquisition.t, and
adjusts C4::Context::IsSuperLibrarian() to return true if no
userenv is set. This is done on the basis that if no userenv is set,
calls to C4::Context routines are being made from a command-line script,
and if you have access to the command line of a running Koha instance,
you implicitly already have better than superlibrarian access.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
C4/Context.pm