We had a lot of trouble with superlibrarian checks in the past, which is why we introduced C4::Context->IsSuperLibrarian(). C4::Auth should use it instead of: 06 && $flags && $flags->{superlibrarian} != 1 http://git.koha-community.org/gitweb/?p=koha.git;a=blobdiff;f=C4/Auth.pm;h=e0cbbc567746dbce7415253f966ce227c58956d7;hp=1b24c4fdb10f746ff81184b6f6edbff17eb4a3d8;hb=d8b3497368b839e4fc594661719351efbe3433cc;hpb=51d7a02726b81b28325f7a151c8670e2f2293f71
Probably here too, noting that on bug 20515: 297 if ( $flags && $flags->{superlibrarian} == 1 ) { 298 $template->param( CAN_user_circulate => 1 );
No, C4::Context->IsSuperlibrarian tells if the logged in user has the superlibrarian flags. In C4::Auth::get_template_and_user the user is not logged in yet.
Actually yes, userenv is set in checkauth which has been called few lines above.
Sorry, Jonathan, I don't understand yet. Maybe we can take a look at it together sometime?
(In reply to Katrin Fischer from comment #4) > Sorry, Jonathan, I don't understand yet. Maybe we can take a look at it > together sometime? Scratch comment 2, we could replace it instead.