Use $neededPermissions
authorTim Düsterhus <timwolla@arcor.de>
Thu, 9 Feb 2012 19:56:08 +0000 (20:56 +0100)
committerTim Düsterhus <timwolla@arcor.de>
Thu, 9 Feb 2012 19:56:08 +0000 (20:56 +0100)
wcfsetup/install/files/lib/acp/action/CacheClearAction.class.php

index b070ce5dfd9466c7fff172d747a352796ceb79e4..1f7bc56567d6fb0cce82cbf9626e541cfd069595 100644 (file)
@@ -22,13 +22,15 @@ use wcf\util\HeaderUtil;
  * @category   Community Framework
  */
 class CacheClearAction extends AbstractAction {
+       /**
+        * @see wcf\action\AbstractAction::$neededPermissions
+        */
+       public $neededPermissions = array('admin.system.canViewLog');
        /**
         * @see wcf\action\IAction::execute()
         */
        public function execute() {
                parent::execute();
-               WCF::getSession()->checkPermissions(array('admin.system.canViewLog'));
-               
                // this will clean up the templates as well
                LanguageFactory::getInstance()->deleteLanguageCache();