OPS 3.5.0-5: Authors cannot cancel their own incomplete submission in the submission wizard (403 unauthorizedDeleteSubmission)

Hi Public Knowledge Project Team,

Describe the issue or problem
In OPS 3.5, when an author clicks “Cancel” in the submission wizard and confirms with “OK”, the submission is not deleted. The dialog closes and the user stays on the same screen with no error message.

The request POST /api/v1/_submissions?ids={id} (X-Http-Method-Override: DELETE) returns:
403 {“error”: “You do not have permission to delete this submission.”} (api.submissions.403.unauthorizedDeleteSubmission)

Managers and site admins can cancel without problems.

Cause (as far as I can tell)
PKP\submission\Repository::canCurrentUserDelete() allows authors to delete their own incomplete submission only if they have a stage assignment whose user group is linked to WORKFLOW_STAGE_ID_SUBMISSION (1):

StageAssignment::withSubmissionIds([$submission->getId()])
    ->withRoleIds([Role::ROLE_ID_AUTHOR])
    ->withStageIds([WORKFLOW_STAGE_ID_SUBMISSION])
    ->withUserId($currentUser->getId())

However, in OPS 3.5 registry/userGroups.xml links the Author group only to stage 5 (stages="5"; it was "1,5" in OPS 3.3). So this check can never succeed for authors in OPS.

The Cancel button itself is still shown, because PKPSubmissionHandler checks only for an author-role stage assignment without checking the stage.

In addition, SubmissionWizardPage.vue puts the JSON error into this.errors and closes the dialog, so the 403 is not displayed to the user.

Steps I took leading up to the issue

  1. Log in as a user with only the Author role.
  2. Start a new submission and proceed to any step of the wizard.
  3. Click “Cancel” and then “OK” in the confirmation dialog.
  4. The submission remains and the API returns 403.

What application are you using?
OPS 3.5.0-5 LTS (PHP 8.4)

Additional information
As a local workaround, we check the author assignment against the submission’s current stage instead of stage 1 (keeping the upstream check first):

if (parent::canCurrentUserDelete($submission)) {
    return true;
}
// ...logged-in user and submissionProgress checks...
$stageId = (int) ($submission->getData('stageId') ?: WORKFLOW_STAGE_ID_PRODUCTION);
return StageAssignment::withSubmissionIds([$submission->getId()])
    ->withRoleIds([Role::ROLE_ID_AUTHOR])
    ->withStageIds([$stageId])
    ->withUserId($currentUser->getId())
    ->get()
    ->isNotEmpty();

Could you confirm whether this is a bug? I’m happy to open a GitHub issue if that is preferred.

Best regards,
Minoru Tanabe.

Hi @Minoru_Tanabe ,

Thanks for the detailed report. Yes, this is a bug, and your diagnosis is correct.

canCurrentUserDelete() requires the author’s stage assignment to be linked to the submission stage, but the Author group in OPS isn’t linked to it. OJS and OMP still assign the Author group to stage 1, which is why this only affects OPS.

I have filed this as pkp/pkp-lib#13410.

Best regards,
Blesilda Biazon
PKP Team

Hi @blesildabiazon ,

Thank you for confirming this so quickly, and for filing pkp/pkp-lib#13410.

The explanation that OJS and OMP still assign the Author group to stage 1 is helpful — it explains why this surfaced only after we moved Jxiv from OPS 3.3 to 3.5.

For now we are running the workaround described above as a small plugin, so no core files are modified on our side, and we will drop it once the fix lands. I’m happy to test a patch against our staging instance if that would be useful.

Thanks again for your help.

Best regards,
Minoru Tanabe.