[~BUGFIX] Extbase: Fixed the way a module gets called.
authorJochen Rau <j.rau@web.de>
Tue, 16 Nov 2010 10:17:03 +0000 (10:17 +0000)
committerJochen Rau <j.rau@web.de>
Tue, 16 Nov 2010 10:17:03 +0000 (10:17 +0000)
typo3/sysext/extbase/Classes/Core/Bootstrap.php
typo3/sysext/extbase/Classes/Utility/Extension.php
typo3/sysext/extbase/ext_tables.php

index ff14fba..709f0ff 100644 (file)
@@ -273,6 +273,20 @@ class Tx_Extbase_Core_Bootstrap {
          * @see run()
          **/
        public function callModule($moduleName) {
+
+               // Check permissions and exit if the user has no permission for entry
+               $GLOBALS['BE_USER']->modAccess($config, TRUE);
+               if (t3lib_div::_GP('id')) {
+                       // Check page access
+                       $id = intval(t3lib_div::_GP('id'));
+                       $permClause = $GLOBALS['BE_USER']->getPagePermsClause(TRUE);
+                       $access = is_array(t3lib_BEfunc::readPageAccess($id, $permClause));
+                       if (!$access) {
+                               t3lib_BEfunc::typo3PrintError('No Access', 'You don\'t have access to this page', 0);
+                       }
+               }
+
+
                $configuration = array();
                $configuration['module.']['tx_extbase.']['moduleName'] = $moduleName;
                $this->run('', $configuration);
index 8302e3b..e1d85ef 100644 (file)
@@ -269,7 +269,7 @@ tt_content.' . $pluginSignature . ' {
                }
 
                if ((strlen($sub) > 0)) {
-                       //$sub = $extensionName . self::convertLowerUnderscoreToUpperCamelCase($sub);
+                       $sub = $extensionName . self::convertLowerUnderscoreToUpperCamelCase($sub);
                        $key = $main . '_' . $sub;
                } else {
                        $key = $main;
index 33ad7fc..0999c51 100644 (file)
@@ -16,7 +16,7 @@ if (TYPO3_MODE == 'BE') {
 
        }
 
-       $TBE_MODULES['_dispatcher'][] = 'Tx_Extbase_Bootstrap->callModule';
+       $TBE_MODULES['_dispatcher'][] = 'Tx_Extbase_Core_Bootstrap->callModule';
        
 }