[TYPO3-core] RFC #11773: Integrate an option to deactivate shortcuts completely

Christopher Stelmaszyk christopher at yahoo.de
Thu Aug 27 11:13:59 CEST 2009


Hi Ingo,

"Ingo Renner" schrieb:
> Christopher Stelmaszyk wrote:
>
> I'm -1 to the patch unless you change the negating name into a positive
> on. - we really have to move away from that stupidity.
>
> I'd suggest to name the option
>
> options.enableShortcuts
>
> and have it default to 1.

Done, see version 2.

> Besides that I wonder of what use it is to disable shortcuts...

Just think of small websites or of users who only see a small part of a 
tree. They don't really need shortcuts.
Besides that I think that a BE which is tidied up generally makes life 
easier; especially for beginners and for users who use TYPO3 seldom.
That is what this option should do. :-)

Christopher


Index: typo3/classes/class.shortcutmenu.php
===================================================================
--- typo3/classes/class.shortcutmenu.php	(revision 5830)
+++ 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.enableShortcuts')) {
+			return true;
+		}
+		return false;
 	}

 	/**
Index: t3lib/class.t3lib_userauthgroup.php
===================================================================
--- t3lib/class.t3lib_userauthgroup.php	(revision 5830)
+++ 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.enableShortcuts') &&
+			$this->getTSConfigVal('options.shortcutFrame') &&
+			!$this->getTSConfigVal('options.mayNotCreateEditShortcuts');
 	}

 	/**
Index: t3lib/config_default.php
===================================================================
--- t3lib/config_default.php	(revision 5830)
+++ t3lib/config_default.php	(working copy)
@@ -202,7 +202,8 @@
 		'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. 


begin 666 11773_enableShortcuts_v2.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]/3T]
M/3T]/3T]/3T]/3T]/3T]/3T]/3T]"BTM+2!T>7!O,R]C;&%S<V5S+V-L87-S
M+G-H;W)T8W5T;65N=2YP:' )*')E=FES:6]N(#4X,S I"BLK*R!T>7!O,R]C
M;&%S<V5S+V-L87-S+G-H;W)T8W5T;65N=2YP:' )*'=O<FMI;F<@8V]P>2D*
M0$ @+3DY+#@@*SDY+#$P($! "B )("H at 0')E='5R;B @8F]O;&5A;B @=')U
M92!I9B!U<V5R(&AA<R!A8V-E<W,L(&9A;'-E(&EF(&YO= H@"2 J+PH@"7!U
M8FQI8R!F=6YC=&EO;B!C:&5C:T%C8V5S<R at I('L*+0D)"2\O(%-H;W)T8W5T
M(&UO9'5L92!I<R!E;F%B;&5D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&QO9V=E9"!I;B!S>7-?=')A
M8VMB975S97(N(%1H:7,@:7,@=7-E9"!T;R!G970 at 82!V:65W(&]F('1H92!B
M86-K96YD('5S97)S(&)E:&%V:6]U<BX at 36]S=&QY(&9O<B!D96)U9V=I;F<L
M('-U<'!O<G0 at 86YD('5S97(@:6YT97)A8W1I;VX at 86YA;'ES:7,N(%)E<75I
M<F5S("=B975S97)?=')A8VMI;F<G(&5X=&5N<VEO;BX*+2 )"2=D969A=6QT
M57-E<E138V]N9FEG)R ]/B G;W!T:6]N<RYS:&]R=&-U=$9R86UE/3$G+ D)
M"2\O(%-T<FEN9RX at 16YT97(@;&EN97,@;V8 at 9&5F875L="!B86-K96YD('5S
M97(O9W)O=7 @5%-C;VYF:6<N"BL@"0DG9&5F875L=%5S97)44V-O;F9I9R<@
M/3X@)V]P=&EO;G,N<VAO<G1C=71&<F%M93TQ"BL)"0EO<'1I;VYS+F5N86)L
M95-H;W)T8W5T<STQ)RP)"0DO+R!3=')I;F<N($5N=&5R(&QI;F5S(&]F(&1E
M9F%U;'0 at 8F%C:V5N9"!U<V5R+V=R;W5P(%138V]N9FEG+ at H@"0DG9&5F875L
M=%!A9V544V-O;F9I9R<@/3X@)R<L"0D)+R\@16YT97(@;&EN97,@;V8 at 9&5F
M875L="!086=E(%138V]N9FEG+ at H@"0DG9&5F875L=%!E<FUI<W-I;VYS)R ]
M/B!A<G)A>2 H"0D)+R\@1&5F875L="!P97)M:7-S:6]N<R!S970 at 9F]R(&YE
M=R!P86=E<R!I;B!T,VQI8B]T8V5?;6%I;BYP:' N($ME>7, at 87)E("=S:&]W
M+&5D:70L9&5L971E+&YE=RQE9&ET8V]N=&5N="<N($5N=&5R(&%S(&-O;6UA
M+6QI<W0*("\O"0D))W5S97(G(#T^("<G+ D)"0D)"2\O(&1E9F%U;'0@:6X@
M=&-E7VUA:6X@:7,@)W-H;W<L961I="QD96QE=&4L;F5W+&5D:71C;VYT96YT
M)RX at 268@=&AI<R!I<R!S970@*'5N8V]M;65N="DL('1H:7,@=F%L=64@:7,@
-=7-E9"!I;G-T96%D+@``
`
end



More information about the TYPO3-team-core mailing list