[TASK] Remove superfluous admin check 35/56335/3
authorGeorg Ringer <georg.ringer@gmail.com>
Sat, 17 Mar 2018 18:58:07 +0000 (19:58 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 18 Mar 2018 11:39:09 +0000 (12:39 +0100)
As the scheduler module is only accessible for admins, there is no need
to check this in the controller.

Resolves: #84454
Releases: master
Change-Id: I234872820faa7c729a52c030383f6b24e6c1eca5
Reviewed-on: https://review.typo3.org/56335
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php

index 1cbaac0..dc4d8f3 100644 (file)
@@ -160,21 +160,15 @@ class SchedulerModuleController
             ]
         ];
         $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, GeneralUtility::_GP('SET'), 'system_txschedulerM1', '', '', '');
-        // Access check!
-        // The page will show only if user has admin rights
-        if ($this->getBackendUser()->isAdmin()) {
-            // Set the form
-            $content = '<form name="tx_scheduler_form" id="tx_scheduler_form" method="post" action="">';
-
-            // Prepare main content
-            $content .= '<h1>' . $this->getLanguageService()->getLL('function.' . $this->MOD_SETTINGS['function']) . '</h1>';
-            $content .= $this->getModuleContent();
-            $content .= '<div id="extraFieldsSection"></div></form><div id="extraFieldsHidden"></div>';
-        } else {
-            // If no access, only display the module's title
-            $content = '<h1>' . $this->getLanguageService()->getLL('title.') . '</h1>';
-            $content .= '<div style="padding-top: 5px;"></div>';
-        }
+
+        // Set the form
+        $content = '<form name="tx_scheduler_form" id="tx_scheduler_form" method="post" action="">';
+
+        // Prepare main content
+        $content .= '<h1>' . $this->getLanguageService()->getLL('function.' . $this->MOD_SETTINGS['function']) . '</h1>';
+        $content .= $this->getModuleContent();
+        $content .= '<div id="extraFieldsSection"></div></form><div id="extraFieldsHidden"></div>';
+
         $this->getButtons();
         $this->getModuleMenu();