[BUGFIX] Stage buttons shown in frontend without user being repsonsible 97/46597/2
authorOliver Hader <oliver@typo3.org>
Thu, 11 Feb 2016 15:13:52 +0000 (16:13 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Thu, 25 Feb 2016 12:24:38 +0000 (13:24 +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/46597
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/workspaces/Classes/Service/StagesService.php

index 0b4cf85..ea4aca9 100644 (file)
@@ -111,7 +111,7 @@ class StagesService {
                                break;
                        }
                }
-               if ($found === FALSE) {
+               if ($found === FALSE || !$this->isStageAllowedForUser($currentStage['uid'])) {
                        $previousStage = array();
                }
                return array(
@@ -160,7 +160,7 @@ class StagesService {
                                break;
                        }
                }
-               if ($found === FALSE) {
+               if ($found === FALSE || !$this->isStageAllowedForUser($currentStage['uid'])) {
                        $nextStage = array();
                }
                return array(