[FEATURE] Allow workspace members to send item back to edit
authorBart Dubelaar <bartdubelaar@gmail.com>
Sun, 31 Mar 2013 02:17:27 +0000 (04:17 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Mon, 1 Apr 2013 20:42:31 +0000 (22:42 +0200)
As all members of a workspace can edit an element in review
they should also be able to send it to editing by changing
the stage. This also allows notification of the original editors
with a stage notification mail.
In the old workspaces this was possible by rejecting an element,
in the current workspaces rejection is not implemented.
So at least this will allow a notification, even though the original
editor has to be tracked by hand.

Change-Id: I0d553570cb9e32bfa49e8821c55b40089ad1bde0
Resolves: #32473
Releases: 6.1
Reviewed-on: https://review.typo3.org/13398
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
typo3/sysext/workspaces/Classes/Service/StagesService.php

index 23f9b42..966d318 100644 (file)
@@ -255,7 +255,10 @@ class StagesService {
                                $orderedAllowedStages = $workspaceStageRecs;
                        } else {
                                foreach ($workspaceStageRecs as $workspaceStageRec) {
-                                       if ($this->isStageAllowedForUser($workspaceStageRec['uid'])) {
+                                       if ($workspaceStageRec['uid'] === self::STAGE_EDIT_ID) {
+                                               $allowedStages[self::STAGE_EDIT_ID] = $workspaceStageRec;
+                                               $stagesForWSUserData[$workspaceStageRec['uid']] = $workspaceStageRec;
+                                       } elseif ($this->isStageAllowedForUser($workspaceStageRec['uid'])) {
                                                $stagesForWSUserData[$workspaceStageRec['uid']] = $workspaceStageRec;
                                        } elseif ($workspaceStageRec['uid'] == self::STAGE_PUBLISH_EXECUTE_ID && $GLOBALS['BE_USER']->workspacePublishAccess($this->getWorkspaceId())) {
                                                $allowedStages[] = $workspaceStageRec;