[Koha-bugs] [Bug 24003] REST API should set C4::Context->userenv

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jun 8 14:22:08 CEST 2020


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

--- Comment #17 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Say you are going to implement the DELETE route for items, you will need to
call Koha::Item->safe_to_delete.

246     return "not_same_branch"                                                
247       if defined C4::Context->userenv                                       
248       and !C4::Context->IsSuperLibrarian()                                  
249       and C4::Context->preference("IndependentBranches")
250       and ( C4::Context->userenv->{branch} ne $self->homebranch );   

Don't you want the branch to be defined at this point? Isn't that the purpose
of this patch?

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


More information about the Koha-bugs mailing list