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

As an Editor I want to be able to delete draft if I have proper permissions

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Backlog
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Steps:

      1. Update Editor's role:

      • User/Login
      • Content/Read
      • Content/Create
      • Content/Edit
      • Content/Reverserelatedlist
      • Content/Versionread
      • Contetn/Versionremove
      • Assignments: no limitation

      2. Log in as Editor
      3. Go to Content/Content structure
      4. Click Create and select Article
      5. Fill required fields
      6. Save
      7. Delete draft

      Actual result:

      403 error is thrown, because user doesn't have Content/Remove policy.

      Repository forms:

             // if there is only one version you have to remove whole content instead of a version itself
              if (1 === count($this->contentService->loadVersions($contentInfo))) {
                  $parentLocation = $this->locationService->loadParentLocationsForDraftContent($versionInfo)[0];
                  $redirectionLocationId = $parentLocation->id;
                  $this->contentService->deleteContent($contentInfo);
              } else {
                  $redirectionLocationId = $contentInfo->mainLocationId;
                  $this->contentService->deleteVersion($versionInfo);
              }
      
      Expected result:

      If user doesn't have permission to delete draft, button should not be active.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              barbara.grajczyk@ez.no Barbara Grajczyk
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: