omeka-s
omeka-s copied to clipboard
Inconsistent batch display on browse pages
Right now, the batch edit/delete options on resource browse pages only render when the current user has the batch_update
privilege, which only global and site administrators have, as far as I can tell. What is strange is that there's no check against batch_update
when rendering the batch checkboxes, which render simply when the current user has update
or delete
privileges on the respective resource. The result is, when logged in as a non-admin user, you could see the batch checkboxes but not the batch options.
I forgot our rationale for limiting batch options to admin roles, but we should either reconsider or prevent all other roles from seeing the checkboxes.
Yeah, that's strange. I know there's code for only rendering the boxes for things you actually have the ability to edit, which implies that the "batch" control would be there for those users.
I believe there's also already a provision for the "batch all" to skip things you don't have permission for also, leading me to think the way to go here is to just extend the "batch_update" permission to all roles that have any ability to edit anything (everyone but Researcher, I believe that would be?)
fwiw, the dropdown isn't showing up for logged-in Reviewers, Authors, or Editors. (It only shows up for Global or Site Admins)
Note that some other modules use the batch drop down (for example my version of Zotero import, that allows to export items to Zotero), so it should be displayed for any users, according to the rights defined in each module. This is not only batch_update or batch_create.
This is now fixed for editors. We'll look into showing the checkboxes only if the current user has edit permissions for the resource and has batch_update
permission.