[Koha-bugs] [Bug 20256] Add ability to limit editing of items to home library

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Apr 25 09:52:05 CEST 2019


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

Josef Moravec <josef.moravec at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |Failed QA

--- Comment #39 from Josef Moravec <josef.moravec at gmail.com> ---
(In reply to Josef Moravec from comment #33)
> (In reply to Kyle M Hall from comment #31)
> > Comment on attachment 88546 [details] [review] [review]
> > Bug 20256: Use new methods
> > 
> > Review of attachment 88546 [details] [review] [review]:
> > -----------------------------------------------------------------
> > 
> > ::: C4/Items.pm
> > @@ +1746,4 @@
> > >          $status = "book_on_loan";
> > >      }
> > >      elsif ( defined C4::Context->userenv
> > > +         and !Koha::Patrons->find( C4::Context->userenv->{number} )->can_edit_item( $item ) )
> > 
> > cli scripts have no userenv, so this is cli safe.
> 
> 
> Sorry, I totally misread the code, you are right

I misread the code, but it is still valid, since bug 22600 added userenv to
commandline/cron scripts...

I added follow-up for this and for some other minor issues.

But there is still one bigger problem: On biblio detail page, the checkbox is
shown only when user can edit the item, but the edit button in the most right
column of items table does not respect this logic. Even worse, I am able to
edit the item, when i click it or reach the edit item form directly. This
should be fixed on module level I think...

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


More information about the Koha-bugs mailing list