Project

General

Profile

Bug #12307 » 12307_workspace_edtiting.patch

Sonja Schubert, 2011-01-18 21:54

View differences:

Classes/Service/Stages.php (revision )
// if there's no next-stage the stageIds match,
// otherwise we've to check if the user is permitted to use the stage
if (!empty($nextStage) && $nextStage['uid'] != $stageId) {
$isAllowed = $this->isStageAllowedForUser($nextStage['uid']);
// if the current stage is allowed for the user, the user is also allowed to send to next
$isAllowed = $this->isStageAllowedForUser($stageId);
}
} catch (Exception $e) {
// Exception raised - we're not allowed to go this way
......
$cacheKey = $this->getWorkspaceId() . '_' . $stageId;
$isAllowed = FALSE;
if (isset($this->workspaceStageAllowedCache[$cacheKey])) {
$isAllowed = $this->workspaceStageAllowedCache[$cacheKey];
$isAllowed = $this->workspaceStageAllowedCache[$cacheKey];
} else {
$isAllowed = $GLOBALS['BE_USER']->workspaceCheckStageForCurrent($stageId);
$this->workspaceStageAllowedCache[$cacheKey] = $isAllowed;
$isAllowed = $GLOBALS['BE_USER']->workspaceCheckStageForCurrent($stageId);
$this->workspaceStageAllowedCache[$cacheKey] = $isAllowed;
}
return $isAllowed;
}
(1-1/8)