Fixed permission check
authorMarcel Werk <burntime@woltlab.com>
Mon, 3 Jun 2013 18:28:27 +0000 (20:28 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 3 Jun 2013 18:28:27 +0000 (20:28 +0200)
wcfsetup/install/files/lib/form/AbstractModerationForm.class.php

index 8e9912ee5ade133a0c39b56e7e73a15958c87de3..ae826fdb440b019d53f110fe142a36edc98a771a 100644 (file)
@@ -45,6 +45,11 @@ abstract class AbstractModerationForm extends AbstractForm {
         */
        public $loginRequired = true;
        
+       /**
+        * @see wcf\page\AbstractPage::$neededPermissions
+        */
+       public $neededPermissions = array('mod.general.canUseModeration');
+       
        /**
         * moderation queue object
         * @var wcf\data\moderation\queue\ViewableModerationQueue
@@ -65,7 +70,7 @@ abstract class AbstractModerationForm extends AbstractForm {
                
                if (isset($_REQUEST['id'])) $this->queueID = intval($_REQUEST['id']);
                $this->queue = ViewableModerationQueue::getViewableModerationQueue($this->queueID);
-               if (!$this->queue === null) {
+               if ($this->queue === null) {
                        throw new IllegalLinkException();
                }