omeka-s icon indicating copy to clipboard operation
omeka-s copied to clipboard

Inconsistent batch display on browse pages

Open jimsafley opened this issue 6 years ago • 5 comments

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.

jimsafley avatar Oct 03 '18 17:10 jimsafley

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.

zerocrates avatar Oct 03 '18 18:10 zerocrates

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?)

zerocrates avatar Oct 03 '18 18:10 zerocrates

fwiw, the dropdown isn't showing up for logged-in Reviewers, Authors, or Editors. (It only shows up for Global or Site Admins)

mebrett avatar Oct 03 '18 18:10 mebrett

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.

Daniel-KM avatar Oct 10 '18 13:10 Daniel-KM

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.

jimsafley avatar Aug 03 '22 17:08 jimsafley