-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow editors and editorial assistants to preview an article before it is published #5565
Comments
@NateWr Some code for this got removed right before the 3.2.0 release, correct? Could you link to that? |
PRs here: #5563 (comment) I think there used to be a PublishedSubmissionPolicy or something like that which was removed in the clear out of PublishedSubmission stuff. I think, in order for this to work, we probably just need a policy that checks if a submission is published. If it is, let everyone access. If it's not, apply SubmissionAccessPolicy to see if they have access. But when I took a quick look at that it didn't look so easy, I think because the policy expects to find the ID in the |
@asmecher here's some work in progress on the article preview access: NateWr/ojs@381a046. Here's an overview of how it works and the challenges in getting this right. The main challenge is re-using the existing authorization policies to determine when a user should have access to a preview. These policies require query params like This works in the most basic sense. However, the preview isn't really functional. The user can not click to preview the PDF or other galleys. And in cases where the user may be previewing a second or third version, they don't see a correct list of versions. |
Something to think about for the future: when we start migrating submission files, review assignments and other workflow concerns over to the REST API, we're going to run into a similar mismatch between information in the URL and what the authorization policies require. Some of the REST API URLs will look like:
|
Hi @NateWr |
Unfortunately, not at this time. The plan was to have it for 3.3, but that is looking less likely because there are so many things to tackle for that release. The good news is that there appears to already be a method, |
thank you very much for your answer |
It might! I can't confirm without looking into it further, but that may do the trick. Have you tested this out to see if it allows/prevents access at the right times? |
I have tested, but my knowledge about OJS is very poor - |
Hi all, Sorry for the late response. Thanks, @majaroenne! I'll take a look at it soon. |
Yes, it grants access to the article/galley page to users with correspondent roles, tested with a manager and author role. Access is prevented for other users (checked with logged out users and logged in as authors not associated with the submission). The access is granted starting from the submission stage. @NateWr, is the idea to show article preview only on the production stage? If an article isn't assigned to an issue, the Citation Style Language Plugin throws a fatal error preventing the preview:
According to annotation of Otherwise looks good! |
Thanks @Vitaliy-1! Could you also test with a subeditor and an assistant? These are often the most challenging user permissions to get right.
I think it's ok to have the preview earlier. My thinking is that the best thing to do is to add a preview button in the publication tab, for any publication that is not published: @majaroenne would you be able to open a pull request with your changes so we can do a full code review? Would you be able to add the Preview button in the example above? You'll need to add it to @Vitaliy-1 it looks like CitationStyleLanguagePlugin just needs a conditional around use of the issue. Can you take care of that? |
Yeah that's correct. You will probably want this to be in state, because the status of a publication will change and so the preview button will need to be shown/hidden as that changes. |
PRs: |
This looks great Vitaliy. I played around with it and there are just two small things left:
|
pkp/pkp-lib#5565 fix fatal error on preview before issue assigned
pkp/pkp-lib#5565 submission preview implementation
[stable-3_2_1] pkp/pkp-lib#5565 fix fatal error on preview before issue assigned
All merged, thanks @Vitaliy-1 and @majaroenne! This will go out with 3.2.1-2 and 3.3. @asmecher the preview feature has been merged to @amandastevens and @kaitlinnewson this may impact docs for OJS. It adds a "Preview" button to two places in the editorial workflow when a submission has reached the copyediting stage. |
Is there any solution to create html galley on the fly? |
@asifdev124, your last comment appears to be cross-posted on the support forum (https://forum.pkp.sfu.ca/t/ojs-3-2-1-html-galleys-for-article-previews/62443/9) -- that's the best place to discuss this. |
Describe the problem you would like to solve
It would be nice if an article could be previewed before it is published. This provides a useful last-stage check to make sure things "look" like they are supposed to.
Describe the solution you'd like
3.2 had a preview button in the workflow, where the View button is now, which would appear before a submission was published. This had to be revoked at the last minute due to some permissions issues (#5563). This should be restored.
The text was updated successfully, but these errors were encountered: