Skip to content
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

[Bug, EC]: Unchecked array access in WorkflowManagementListener causes warning in backoffice when moving document #487

Closed
wisconaut opened this issue Apr 11, 2024 · 1 comment · Fixed by #488
Assignees
Milestone

Comments

@wisconaut
Copy link
Contributor

Description

As the moving of elements requires the settings permission, which also shows the settings tab, I allowed settings in the workspace permissions, but forbid it on every workflow place. This hides the settings tab, but allows to move the element - in this case a document (page).
But in doing so, I get a warning in the backoffice when moving an item (see screenshot).

This is the relevant code and it can be found here:

$data['userPermissions'] = array_merge( (array)$data['userPermissions'], $placeConfig->getUserPermissions($workflow, $element) );

A possible solution would be to preset the array index if it is not set beforehand:

if (!isset($data['userPermissions'])) { $data['userPermissions'] = []; }

How to reproduce

  • Create a backoffice user with all workspace permissions for documents except versions and properties
  • Create a workflow for those documents and forbid settings for all places
  • Create pages and try to move them
@kingjia90
Copy link
Contributor

Resolved by #488

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants