Added feature #11966: htmlArea RTE: Restrict access to "Clear RTE Cache" option in...
authorStanislas Rolland <typo3@sjbr.ca>
Wed, 16 Sep 2009 07:43:54 +0000 (07:43 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Wed, 16 Sep 2009 07:43:54 +0000 (07:43 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5937 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/hooks/clearrtecache/class.tx_rtehtmlarea_clearcachemenu.php

index 4564974..ac7e94e 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
 
        * Fixed bug #11915: htmlArea RTE: superfluous span tags in content after server-based cleaning on paste operation
        * Follow-up to bug #11946: htmlArea RTE: reference was made to context menu item after context menu was closed
+       * Added feature #11966: htmlArea RTE: Restrict access to "Clear RTE Cache" option in clear cache menu
 
 2009-09-13  Stanislas Rolland  <typo3@sjbr.ca>
 
index cf7e434..81263ac 100644 (file)
@@ -2,6 +2,7 @@
 
        * Fixed bug #11915: htmlArea RTE: superfluous span tags in content after server-based cleaning on paste operation
        * Follow-up to bug #11946: htmlArea RTE: reference was made to context menu item after context menu was closed
+       * Added feature #11966: htmlArea RTE: Restrict access to "Clear RTE Cache" option in clear cache menu
 
 2009-09-13  Stanislas Rolland  <typo3@sjbr.ca>
 
index dc2e771..e4cf0cc 100644 (file)
@@ -43,16 +43,18 @@ class tx_rtehtmlarea_clearcachemenu implements backend_cacheActionsHook {
         * @return      void
         */
         public function manipulateCacheActions(&$cacheActions, &$optionValues) {
-                       // Add new cache menu item
-               $title = $GLOBALS['LANG']->sL('LLL:EXT:rtehtmlarea/hooks/clearrtecache/locallang.xml:title');
-               $cacheActions[] = array(
-                       'id'    => 'clearRTECache',
-                       'title' => $title,
-                       'href'  => $GLOBALS['BACK_PATH'] . 'ajax.php?ajaxID=rtehtmlarea::clearTempDir',
-                       'icon'  => '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'sysext/rtehtmlarea/hooks/clearrtecache/clearrtecache.png', 'width="16" height="16"').' title="'.$title.'" alt="'.$title.'" />'
-                       //'icon'  => '<img src="' . t3lib_extMgm::extRelPath('rtehtmlarea') . 'hooks/clearrtecache/clearrtecache.png" width="16" height="16" title="'.htmlspecialchars($title).'" alt="" />'
-               );
-               $optionValues[] = 'clearRTECache';
+               if ($GLOBALS['BE_USER']->isAdmin() || $GLOBALS['BE_USER']->getTSConfigVal('options.clearCache.clearRTECache')) {
+                               // Add new cache menu item
+                       $title = $GLOBALS['LANG']->sL('LLL:EXT:rtehtmlarea/hooks/clearrtecache/locallang.xml:title');
+                       $cacheActions[] = array(
+                               'id'    => 'clearRTECache',
+                               'title' => $title,
+                               'href'  => $GLOBALS['BACK_PATH'] . 'ajax.php?ajaxID=rtehtmlarea::clearTempDir',
+                               'icon'  => '<img'.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'sysext/rtehtmlarea/hooks/clearrtecache/clearrtecache.png', 'width="16" height="16"').' title="'.$title.'" alt="'.$title.'" />'
+                               //'icon'  => '<img src="' . t3lib_extMgm::extRelPath('rtehtmlarea') . 'hooks/clearrtecache/clearrtecache.png" width="16" height="16" title="'.htmlspecialchars($title).'" alt="" />'
+                       );
+                       $optionValues[] = 'clearRTECache';
+               }
         }
 }