[Koha-bugs] [Bug 10679] Lists interface offers delete option when user doesn' t have permission

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Feb 15 02:03:18 CET 2017


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

--- Comment #4 from Aleisha Amohia <aleishaamohia at hotmail.com> ---
Created attachment 60228
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60228&action=edit
Bug 10679: Hide delete option for lists if user does not have permission

The reason the delete button was still showing is because, by default,
we allow anyone to remove THEIR OWN contributions from a list. So, the
delete button will always show. This patch makes sure that the delete
button will only show if permission for anyone else to add or delete
their own entries is granted.

To test:
1) Make a public list setting all permissions to 'do not allow' EXCEPT
'remove own contributed entries' (set this to Allow). This should be
done by default, but just make sure
2) Log in as a different user and go to that list. notice the 'remove
selected' button shows, but attempting to delete any records fails.
3) Apply patch and refresh the page
4) Notice that the delete button is now gone.
5) Log back in as the list owner and set the first two permissions to
'Allow' (add entries, remove their own contributed entries)
6) Log back in as a different user and go to the list. The delete button
should now be showing and work as expected.

Sponsored-by: Catalyst IT

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


More information about the Koha-bugs mailing list