Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-29087

Sending to trash should rely on content/remove policy

    XMLWordPrintable

    Details

      Description

      Currently when sending to trash only content/manage_locations policy is taken into account. To be consistent with legacy only content/remove should be verified.

      Steps to reproduce:
      1. Create a new user e.g. "editor".
      2. Assign it to a new group e.g. editors.
      3. Modify the policies for this group, so it should have content/remove but not content/manage_policies.
      4. Log in as "editor" and create some content.
      5. Try to remove it.
      Result: in v1 there is an error: An error occurred when sending 'New article' to Trash, in v2 the "Send to trash" button is disabled.

      Ref:
      legacy: https://github.com/ezsystems/ezpublish-legacy/blob/master/kernel/classes/ezcontentobjecttreenode.php#L392
      platform: https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Publish/Core/Repository/TrashService.php#L120

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              konrad.oboza@ez.no Konrad Oboza
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: