Assoc_type preventing file download by Copyeditor (OJS 3.3.0.13)

On one journal the copy editor is getting this JSON error when trying to access a Draft file:

{“status”:false,“content”:“You have not been assigned to this submission with a role that is allowed to access this operation.”,“elementId”:“0”,“events”:null}

As can be seem on the table, the file 81438 is given the error, and the only thing I noticed that is different in this file from other files that the copyeditor has access is the assoc_type column. And if I set the assoc_type from 520 to NULL, he can download the file, which confirms this hypothesis. What could have caused this, and what is the purpose of assoc_type there?

This seems to be related to: OJS 3 - The current role does not have access to this operation - #44 by drugurkocak but this is 5 years old, so I’m not sure.

Hi @luizborges,

Hmm… The assoc_type = 520 means it is a file from a discussion, in your case probably “Copyediting Discussion”. Could you maybe double check in the backend, where that file actually is – is that file with the ID 81438 in “Draft Files” grid (when you go with the mouse over the file link there, you will see the submissionFileId in the browser’s footer), or maybe in one of the discussions in the “Copyediting Discussion” grid (e.g. when you edit the discussion and go over the file link) on the Copyediting page?

Best,
Bozana

The file is in the Draft Files section:

Hi @luizborges,

Hmmm… I do not know how come that file has assoc_type = 520… :thinking:
Do you have more of such cases?

Best,
Bozana

Looking at the submission history it seems like the file did come from the discussion but the Copyeditor should have been able to download it, right? The order seems to be:

03/10 - file received on discussion.
15/10 - file selected to the Draft Files section and Copyeditor assigned (not sure which came first).

Looks like this file was the only one that the copyeditor could not download, and after changing the 520 to NULL the issue was solved…

Hi @luizborges

OK, I could reproduce the case and have created an issue where this would need to be fixed: draft copyediting file copied from a discussion can not be accessed · Issue #10584 · pkp/pkp-lib · GitHub.

(I think you temporary solution to set assoc_type to NULL is OK).

Thanks!
Bozana

1 Like