-
Notifications
You must be signed in to change notification settings - Fork 461
pkp/pkp-lib#10929 Temporary fix for Production Editor's file upload issues #11075
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
base: stable-3_5_0
Are you sure you want to change the base?
Conversation
ff94a7b
to
2d81c3e
Compare
@@ -664,8 +664,34 @@ public function add(Request $illuminateRequest): JsonResponse | |||
: $submitAsUserGroup->permitMetadataEdit | |||
); | |||
|
|||
$isSubmittingAsProductionEditor = $submitAsUserGroup->getLocalizedData('name') === __('default.groups.name.productionEditor'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is the best way to check for a specific role. Open to suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the best way would be to check the access to the submission stage through the user group stage table
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to mention that OPS might require different treatment - in 3.5 stage ID has only value 5
there, submission stage was removed.
3bf5692
to
38709e1
Compare
@Vitaliy-1 Thanks for the review. I've made the updates based on your suggestions. Also, given that OPS does not have Production Editor group, and production stage (stage ID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late reply!
The part of code that checks user roles and automatically assigns author role if necessary is here: https://github.com/pkp/pkp-lib/blob/main/pages/submission/PKPSubmissionHandler.php#L615
Thus, it makes senes to move the check there.
Moreover, I don't know what was the initial idea behind that part. In my opinion, it makes sense to check if user has access to the submission stage in general, and if not, assign an author role. That applies, for production editors, which are managers, copyeditors, layout editors, reviewers... and custom user groups.
Also, we might want to exclude user groups without access to submission stage from from the list here: https://github.com/pkp/pkp-lib/blob/main/classes/components/forms/submission/StartSubmission.php#L159
9bad3a4
to
8538c6b
Compare
…tage when creating a submission
…submit as' options"
8538c6b
to
906217d
Compare
Thanks @Vitaliy-1, I've made updates based on your suggestions:
Take a look and let me know if it makes sense |
For #10929