+2009-09-03 Rupert Germann <rupi@gmx.li>
+
+ * Added feature #0011773: Integrate an option to deactivate shortcuts completely (thanks to Christopher Stelmaszyk)
+
2009-09-03 Stanislas Rolland <typo3@sjbr.ca>
* Updated htmlArea RTE version to 1.8.3 for TYPO3 4.3beta1
* @return boolean
*/
function mayMakeShortcut() {
- return $this->getTSConfigVal('options.shortcutFrame') && !$this->getTSConfigVal('options.mayNotCreateEditShortcuts');
+ // If the old BE is used (maybe with some parameters),
+ // check for options.enableShortcuts and options.shortcutFrame being set.
+ if (substr($this->getTSConfigVal('auth.BE.redirectToURL'), 0, 12) == 'alt_main.php') {
+ return $this->getTSConfigVal('options.enableShortcuts') &&
+ $this->getTSConfigVal('options.shortcutFrame') &&
+ !$this->getTSConfigVal('options.mayNotCreateEditShortcuts');
+ }
+ // If the new BE is used, don't check options.shortcutFrame,
+ // because this is not used there anymore.
+ else {
+ return $this->getTSConfigVal('options.enableShortcuts') &&
+ !$this->getTSConfigVal('options.mayNotCreateEditShortcuts');
+ }
}
/**
'forceCharset' => '', // String. Normally the charset of the backend users language selection is used. If you set this value to a charset found in t3lib/csconvtbl/ (or "utf-8") the backend (and database) will ALWAYS use this charset. Always use a lowercase value.
'installToolPassword' => '', // String. This is the md5-hashed password for the Install Tool. Set this to '' and access will be totally denied. PLEASE consider to externally password protect the typo3/install/ folder, eg. with a .htaccess file.
'trackBeUser' => 0, // Boolean. If set, every invokation of a backend script is logged in sys_trackbeuser. This is used to get a view of the backend users behaviour. Mostly for debugging, support and user interaction analysis. Requires 'beuser_tracking' extension.
- 'defaultUserTSconfig' => 'options.shortcutFrame=1', // String. Enter lines of default backend user/group TSconfig.
+ 'defaultUserTSconfig' => 'options.shortcutFrame=1
+ options.enableShortcuts=1', // String. Enter lines of default backend user/group TSconfig.
'defaultPageTSconfig' => '', // Enter lines of default Page TSconfig.
'defaultPermissions' => array ( // Default permissions set for new pages in t3lib/tce_main.php. Keys are 'show,edit,delete,new,editcontent'. Enter as comma-list
// 'user' => '', // default in tce_main is 'show,edit,delete,new,editcontent'. If this is set (uncomment), this value is used instead.
-->
<table border="0" cellpadding="0" cellspacing="2" id="typo3-shortcuts">
<tr>
- '.implode('
- ',$this->lines).$editIdCode.'
+ ';
+ if ($GLOBALS['BE_USER']->getTSConfigVal('options.enableShortcuts')) {
+ $this->content .= implode('
+ ', $this->lines);
+ }
+ $this->content .= $editIdCode . '
</tr>
</table>
</td>
* @return boolean true if user has access, false if not
*/
public function checkAccess() {
- // Shortcut module is enabled for everybody
- return true;
+ if ($GLOBALS['BE_USER']->getTSConfigVal('options.enableShortcuts')) {
+ return true;
+ }
+ return false;
}
/**