[TYPO3-core] RFC #11773: Integrate an option to deactivate shortcuts completely
Christopher Stelmaszyk
christopher at yahoo.de
Mon Aug 24 21:03:50 CEST 2009
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');
}
/**
begin 666 11773 shortcutsDisabled.patch
M26YD97 at Z('1Y<&\S+V-L87-S97,O8VQA<W,N<VAO<G1C=71M96YU+G!H< H]
M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/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N<VAO<G1C=71&<F%M92<I("8F("$D=&AI
M<RT^9V5T5%-#;VYF:6=686PH)V]P=&EO;G,N;6%Y3F]T0W)E871E161I=%-H
M;W)T8W5T<R<I.PHK"0ER971U<FX@(21T:&ES+3YG97144T-O;F9I9U9A;"@G
M;W!T:6]N<RYS:&]R=&-U='-$:7-A8FQE9"<I("8F"BL)"0DD=&AI<RT^9V5T
M5%-#;VYF:6=686PH)V]P=&EO;G,N<VAO<G1C=71&<F%M92<I("8F"BL)"0DA
M)'1H:7,M/F=E=%130V]N9FEG5F%L*"=O<'1I;VYS+FUA>4YO=$-R96%T945D
9:713:&]R=&-U=',G*3L*( E]"@H@"2\J*@``
`
end
More information about the TYPO3-team-core
mailing list