[TYPO3-core] RFC: #9415 - "Do" Dropdown in Workspace module doesn't respect users rights
Christopher
Christopher at temporaryforwarding.com
Sun Nov 9 02:41:08 CET 2008
Hi Franz,
you wrote in the bugtracker, that additionally the localization is missing.
Now that you are working with the file, could you also do that, please?
I suggest you add the labels to locallang_mod_user_ws.xml, because they are
only used in the workspace-module.
Christopher
"Franz Koch" <typo.removeformessage at fx-graefix.de> schrieb im Newsbeitrag
news:mailman.1.1226156934.4523.typo3-team-core at lists.netfielders.de...
> Hi,
>
> here is the missing patch that I accidently added to RFC#9705. And this
> version is now also created from t3-root - so I hope everything is fine
> with it now.
>
> --
> kind regards,
> Franz Koch
>
--------------------------------------------------------------------------------
> Index: typo3/mod/user/ws/class.wslib_gui.php
> ===================================================================
> --- typo3/mod/user/ws/class.wslib_gui.php (revision 4433)
> +++ typo3/mod/user/ws/class.wslib_gui.php (working copy)
> @@ -182,12 +182,12 @@
> $browse.='<br/>';
> }
> $browse.='<br/>';
> -
> +
> $workspaceOverviewList = $this->displayWorkspaceOverview_list($pArray);
> if ($workspaceOverviewList || $this->alwaysDisplayHeader) {
> // Make header of overview:
> $tableRows = array();
> - $tableRows[] = '
> + $tableHeader = '
> <tr class="bgColor5 tableheader">
> <td nowrap="nowrap" width="100">' . $LANG->getLL('label_pagetree') .
> '</td>
> <td nowrap="nowrap" colspan="2">' . $LANG->getLL('label_live_version') .
> '</td>
> @@ -195,20 +195,29 @@
> <td nowrap="nowrap">' . $LANG->getLL('label_stage') . '</td>
> <td nowrap="nowrap">' . $LANG->getLL('label_publish') . '</td>
> <td><select name="_with_selected_do" onchange="if (confirm(\'Sure you
> want to perform this action with selected elements?\'))
> {document.forms[0].submit();}">
> - <option value="_">Do:</option>
> - <option value="publish">Publish</option>
> - <option value="swap">Swap</option>
> - <option value="release">Release</option>
> - <option value="stage_-1">Stage: Reject</option>
> - <option value="stage_0">Stage: Editing</option>
> - <option value="stage_1">Stage: Review</option>
> - <option value="stage_10">Stage: Publish</option>
> - <option value="flush">Flush (Delete)</option>
> + <option value="_">Do:</option>';
> +
> + if ($this->publishAccess &&
> !($GLOBALS['BE_USER']->workspaceRec['publish_access'] & 1)) {
> + $tableHeader .= '<option value="publish">' .
> $LANG->getLL('stage_publish') . '</option>';
> + if ($GLOBALS['BE_USER']->workspaceSwapAccess()) {
> + $tableHeader .= '<option value="swap">' . $LANG->getLL('img_title_swap')
> . '</option>';
> + }
> + }
> + if ($GLOBALS['BE_USER']->workspace !== 0) {
> + $tableHeader .= '<option value="release">' .
> $LANG->getLL('remove_from_ws_confirmation') . '</option>';
> + }
> + $tableHeader .= $GLOBALS['BE_USER']->workspaceCheckStageForCurrent('-1')
> ? '<option value="stage_-1">' . $LANG->getLL('label_stage') .' ' .
> $LANG->getLL('label_rejected') . '</option>' : '';
> + $tableHeader .= $GLOBALS['BE_USER']->workspaceCheckStageForCurrent('0')
> ? '<option value="stage_0">' . $LANG->getLL('label_stage') .' ' .
> $LANG->getLL('stage_editing') . '</option>' : '';
> + $tableHeader .= $GLOBALS['BE_USER']->workspaceCheckStageForCurrent('1')
> ? '<option value="stage_1">' . $LANG->getLL('label_stage') .' ' .
> $LANG->getLL('stage_review') . '</option>' : '';
> + $tableHeader .= $GLOBALS['BE_USER']->workspaceCheckStageForCurrent('10')
> ? '<option value="stage_10">' . $LANG->getLL('label_stage') .' ' .
> $LANG->getLL('stage_publish') . '</option>' : '';
> +
> + $tableHeader .= '<option value="flush">flush (delete)</option>
> </select></td>
> <td>' . $LANG->getLL('label_lifecycle') . '</td>
> '.($this->showWorkspaceCol ? '<td>' . $LANG->getLL('label_workspace') .
> '</td>' : '').'
> </tr>';
> -
> + $tableRows[] = $tableHeader;
> +
> // Add lines from overview:
> $tableRows = array_merge($tableRows, $workspaceOverviewList);
>
> @@ -1252,7 +1261,7 @@
>
> $raiseOk =
> !$GLOBALS['BE_USER']->workspaceCannotEditOfflineVersion($table,$rec_off);
>
> - if ($raiseOk && $rec_off['t3ver_stage']!=-1) {
> + if ($raiseOk && $rec_off['t3ver_stage'] != -1 &&
> $GLOBALS['BE_USER']->workspaceCheckStageForCurrent($sId)) {
> $onClick = 'var
> commentTxt=window.prompt("'.$LANG->getLL('explain_reject').'","");
> if (commentTxt!=null) {window.location.href="'.$this->doc->issueCommand(
> '&cmd['.$table.']['.$rec_off['uid'].'][version][action]=setStage'.
> @@ -1274,7 +1283,7 @@
> $actionLinks.= '<span style="background-color: '.$color.'; color:
> white;">'.$sLabel.'</span>';
>
> // Raise
> - if ($raiseOk) {
> + if ($raiseOk &&
> $GLOBALS['BE_USER']->workspaceCheckStageForCurrent($sId)) {
> $onClick = 'var commentTxt=window.prompt("'.$label.'","");
> if (commentTxt!=null) {window.location.href="'.$this->doc->issueCommand(
> '&cmd['.$table.']['.$rec_off['uid'].'][version][action]=setStage'.
> @@ -1300,4 +1309,4 @@
>
> include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/mod/user/ws/class.wslib_gui.php']);
> }
>
> -?>
> \ No newline at end of file
> +?>
>
More information about the TYPO3-team-core
mailing list