[TYPO3-dev] Rights for Content Elements

Tapio Markula tapio.markula at atwebteam.com
Fri Apr 13 09:34:57 CEST 2007


Steffen Kamper
> in my opinion no access means no access. So the panel is hidden as well as 
> whole click menu for that element.

ok. Endeed I must keep at least 'paste', if it is among other buttons.

> It should be excluded also in the list of column edit, i have to find the 
> place.

that might be problematic and might fail (commonly I have disabled the 
entire feature).

>>>> 2) Disable link from header
>>>> 3) Disable link from sample texts
> can you give me a clue what links you mean ?

those are for content elements. Header and sample text are edit links.
Links for those must disable too.
> Do you talk from list module ? 
NO Web > Page.

the function below is in class.tx_cms_layout.php


>> function tt_content_drawItem($row, $isRTE=FALSE) {
>> global $TCA;
>>
>> $out='';
>> $outHeader='';
>>
>> // Make header:
>> if ($row['header'] && $row['header_layout']!=100) {
>> $infoArr = Array();
>>
>> $this->getProcessedValue('tt_content','header_position,header_layout,header_link',$row,$infoArr);
>>
>> $outHeader=  ($row['date'] ? htmlspecialchars($this->itemLabels['date'].' 
>> '.t3lib_BEfunc::date($row['date'])).'<br />':'').
>> $this->infoGif($infoArr).
>>
>> '<b>'.$this->linkEditContent($this->renderText($row['header']),$row).'</b><br 
>> />';
>> }
>>
>> The latter is inconvenient.
>>
>> Needs conditions almost to all cases
>>
>> // Make content:
>> $infoArr=Array();
>> switch($row['CType']) {
>> case 'header':
>> if ($row['subheader']) {
>> $this->getProcessedValue('tt_content','layout',$row,$infoArr);
>> $out.= $this->infoGif($infoArr).
>>
>> $this->linkEditContent($this->renderText($row['subheader']),$row).'<br 
>> />';
>> }
>> break;

needs something like
$outHeader .= ...; // first part

$outHeader .= $this->infoGif($infoArr);
			if 
($GLOBALS['BE_USER']->recordEditAccessInternals('tt_content',$this->tt_contentData['nextThree'][$row['uid']]))
				$outHeader .= 
'<b>'.$this->linkEditContent($this->renderText($row['header']),$row).'</b><br 
/>';
			else	$outHeader .= '<b>'.$this->renderText($row['header']).'</b><br />';

...
switch($row['CType'])	{
			case 'header':
				if ($row['subheader'])	{
					$this->getProcessedValue('tt_content','layout',$row,$infoArr);
					$out.=	$this->infoGif($infoArr);
					if 
($GLOBALS['BE_USER']->recordEditAccessInternals('tt_content',$this->tt_contentData['nextThree'][$row['uid']]))
						$out .= 
$this->linkEditContent($this->renderText($row['subheader']),$row).'<br />';
					else	$out .= $this->renderText($row['subheader']).'<br />';
					}
			




More information about the TYPO3-dev mailing list