[BUGFIX] Stage buttons shown in frontend without user being repsonsible 91/46891/2
authorOliver Hader <oliver@typo3.org>
Thu, 11 Feb 2016 15:12:35 +0000 (16:12 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Thu, 25 Feb 2016 12:07:58 +0000 (13:07 +0100)
The workspace preview in the frontend shows the buttons to the previous
and next stage if the user is not responsible for the current stage.
Clicking the button does not forward the records to the names stage
however - this is caught by DataHandlerHook in EXT:version.

Resolves: #73243
Releases: master, 7.6, 6.2
Change-Id: I233629cb393d5786048ab7ead39cd3316780b488
Reviewed-on: https://review.typo3.org/46891
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/workspaces/Classes/Service/StagesService.php

index 95d9faa..d90b97a 100644 (file)
@@ -118,7 +118,7 @@ class StagesService implements \TYPO3\CMS\Core\SingletonInterface
                 break;
             }
         }
-        if ($found === false) {
+        if ($found === false || !$this->isStageAllowedForUser($currentStage['uid'])) {
             $previousStage = array();
         }
         return array(
@@ -166,7 +166,7 @@ class StagesService implements \TYPO3\CMS\Core\SingletonInterface
                 break;
             }
         }
-        if ($found === false) {
+        if ($found === false || !$this->isStageAllowedForUser($currentStage['uid'])) {
             $nextStage = array();
         }
         return array(