[TYPO3-core] RFC #11773: Integrate an option to deactivate shortcuts completely
Rupert Germann
rupi at gmx.li
Thu Sep 3 18:52:15 CEST 2009
FYI: committed to trunk rev 5885
greets
rupert
Christopher Stelmaszyk schrieb:
> Hi!
>
> This is a SVN patch request.
>
> Type: feature
>
> Branches: trunk
>
> BT reference:
> http://bugs.typo3.org/view.php?id=11773
>
> Problem:
> In the old Backend (still present in alt_main.php) it was possible to use
> options.shortcutFrame = 0 to hide the shortcut frame.
> In the new Backend this frame is no longer there.
> Instead you have the shortcut menu in the toolbar at the top.
>
> This menu (and with it the shortcut symbols on every page) can currently not
> be hidden which is annoying.
>
> Therefore it would be useful to have an option to deactivate the shortcuts
> menu.
>
> Solution:
> Integrate "options.shortcutsDisabled = 0/1" as a new option in the
> user-/group-TSconfig.
> Standard-value is 0, so that the standard-behaviour (activated shortcuts by
> default) remains unchanged.
>
> Kind regards
>
> Christopher
>
>
> Index: typo3/classes/class.shortcutmenu.php
> ===================================================================
> --- typo3/classes/class.shortcutmenu.php (revision 5815)
> +++ typo3/classes/class.shortcutmenu.php (working copy)
> @@ -99,8 +99,10 @@
> * @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.shortcutsDisabled')) {
> + return true;
> + }
> + return false;
> }
>
> /**
> Index: t3lib/class.t3lib_userauthgroup.php
> ===================================================================
> --- t3lib/class.t3lib_userauthgroup.php (revision 5815)
> +++ t3lib/class.t3lib_userauthgroup.php (working copy)
> @@ -656,7 +656,9 @@
> * @return boolean
> */
> function mayMakeShortcut() {
> - return $this->getTSConfigVal('options.shortcutFrame') &&
> !$this->getTSConfigVal('options.mayNotCreateEditShortcuts');
> + return !$this->getTSConfigVal('options.shortcutsDisabled') &&
> + $this->getTSConfigVal('options.shortcutFrame') &&
> + !$this->getTSConfigVal('options.mayNotCreateEditShortcuts');
> }
>
> /**
>
>
>
More information about the TYPO3-team-core
mailing list