Project

General

Profile

Bug #18242 » 20080219_checkAccessFor ToolbarModules.diff

Administrator Admin, 2008-02-19 01:28

View differences:

typo3/backend.php (working copy)
<li><div id="logout-button" class="toolbar-item no-separator">'.$this->moduleMenu->renderLogoutButton().'</div></li>';
foreach($this->toolbarItems as $toolbarItem) {
$additionalAttributes = $toolbarItem->getAdditionalAttributes();
$toolbar .= '<li'.$additionalAttributes.'>'.$toolbarItem->render().'</li>';
if($toolbarItem->checkAccess()) {
$additionalAttributes = $toolbarItem->getAdditionalAttributes();
$toolbar .= '<li'.$additionalAttributes.'>'.$toolbarItem->render().'</li>';
}
}
return $toolbar.'</ul>';
typo3/classes/class.backendsearchmenu.php (working copy)
public function setBackend(&$backendReference) {
$this->backendReference = $backendReference;
}
/**
* checks user access to module
*
* @return boolean true if user has access, false if not
*/
public function checkAccess() {
//TODO: ACCESS-CHECK
return true;
}
/**
* Creates the selector for workspaces
* Creates search form
*
* @return string workspace selector as HTML select
*/
......
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/classes/class.backendsearchmenu.php']);
}
?>
?>
typo3/classes/class.clearcachemenu.php (working copy)
public function setBackend(&$backendReference) {
$this->backendReference = $backendReference;
}
/**
* checks user access to module
*
* @return boolean true if user has access, false if not
*/
public function checkAccess() {
//TODO: ACCESS-CHECK
return true;
}
/**
* Creates the selector for workspaces
*
......
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/classes/class.clearcachemenu.php']);
}
?>
?>
typo3/classes/class.shortcutmenu.php (working copy)
public function setBackend(&$backendReference) {
$this->backendReference = $backendReference;
}
/**
* checks user access to module
*
* @return boolean true if user has access, false if not
*/
public function checkAccess() {
//TODO: ACCESS-CHECK
return true;
}
/**
* Creates the shortcut menu (default renderer)
......
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/classes/class.shortcutmenu.php']);
}
?>
?>
typo3/classes/class.workspaceselector.php (working copy)
public function setBackend(&$backendReference) {
$this->backendReference = $backendReference;
}
/**
* checks user access to module
*
* @return boolean true if user has access, false if not
*/
public function checkAccess() {
$MCONF = array();
include('mod/user/ws/conf.php');
return $GLOBALS['BE_USER']->modAccess(array('name' => 'user', 'access' => 'user,group'), false) && $GLOBALS['BE_USER']->modAccess($MCONF, false);
}
/**
* changes workspace if needed and then reloads the backend
......
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/classes/class.workspaceselector.php']);
}
?>
?>
typo3/interfaces/interface.backend_toolbaritem.php (working copy)
public function setBackend(&$backendReference);
/**
* checks user access to module
*
* @return boolean true if user has access, false if not
*/
public function checkAccess();
/**
* renders the toolbar item
*
* @return string the toolbar item rendered as HTML string
......
public function getAdditionalAttributes();
}
?>
?>
typo3/sysext/opendocs/class.tx_opendocs.php (working copy)
$this->backendReference = $backendReference;
}
/**
* checks user access to module
*
* @return boolean true if user has access, false if not
*/
public function checkAccess() {
//TODO: ACCESS-CHECK
return true;
}
/**
* renders the toolbar item and the empty menu
(2-2/2)