DSpace / DSpace

(Official) The DSpace digital asset management system that powers your Institutional Repository
https://wiki.lyrasis.org/display/DSDOC8x/
BSD 3-Clause "New" or "Revised" License
883 stars 1.3k forks source link

Reviewers cannot edit files even when workflow.reviewer.file-edit in workflow.cfg is set to true #9734

Open peter975 opened 1 month ago

peter975 commented 1 month ago

Describe the bug

DSpace 7.6.1 When a collection has a single or score review workflow assigned and workflow.reviewer.file-edit = true is present in workflow.cfg, a reviewer that has taken the workflow item cannot edit the files in the item being reviewed. The Edit or View buttons are not present.

To Reproduce

Steps to reproduce the behavior: Single review and score based review feature is described here: https://wiki.lyrasis.org/display/DSDOC7x/Configurable+Workflow

  1. Assign a collection as score-based review in ~/dspace/config/spring/api/workflow.xml
  2. Edit workflow.cfg and set workflow.reviewer.file-edit = true
  3. Add a reviewer e-person to the Reviewers group
  4. Submit an item to the review collection.
  5. As the reviewer e-person, claim the task from MyDSpace --> Workflow tasks.
  6. Only the Rate, Return to Pool and Decline options will be present.

Expected behavior

Once a reviewer has claimed an item they should see an Edit Item and/or Review option.

tdonohue commented 1 month ago

It appears the workflow.reviewer.file-edit setting is no longer used anywhere in the codebase. I'm not sure where it used to appear in 6.x, but I'm not finding any usages in DSpace 7.x or 8.x. So, this requires a volunteer to investigate if we can restore this functionality or if the configuration needs to be removed entirely.

Moving this to the maintenance board.

amgciadev commented 1 month ago

That's correct @tdonohue. I'll be linking a PR that fixes this soon.

amgciadev commented 1 month ago

@tdonohue, I have also noticed when testing the reviewer workflow when enabling the workflow.reviewer.file-edit setting that, when impersonating a reviewer, they are able to modify metadata, delete submitted files but when attempting to add a new file an error is produced. This could be related to https://github.com/DSpace/DSpace/issues/8957. When debugging I can see that the uploadInternal method, when the context is obtained, the EPerson of the admin is returned as the current user as opposed to the EPerson object of the impersonated user. This works correctly when deleting files or editing metadata.