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

--- Comment #8 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
(In reply to David Cook from comment #4)
> Comment on attachment 122341 [details] [review]
> Bug 26383: WIP Replace C4::Context->IsSuperLibrarian with
> Koha::Patron->is_superlibrarian
> 
> Review of attachment 122341 [details] [review]:
> -----------------------------------------------------------------
> 
> ::: C4/Circulation.pm
> @@ +1073,5 @@
> > +
> > +    my $userenv = C4::Context->userenv;
> > +    if ( C4::Context->preference("IndependentBranches") && $userenv ) {
> > +        my $logged_in_user = Koha::Patrons->find($userenv->{number});
> > +        unless ( $logged_in_user->is_superlibrarian ) {
> 
> Technically, the session stores the flags value, so we could just do the
> calculation off the session data. The only downside of doing that is that we
> probably only set the flags session data at login time, so if someone's
> permissions change while they're logged in, it won't be detected until
> they've logged out and logged back in. But... it would mean fewer database
> calls.

Can we drop open sessions in the event of permission changes?

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to