Added missing permission check
authorMarcel Werk <burntime@woltlab.com>
Fri, 27 Sep 2013 17:32:07 +0000 (19:32 +0200)
committerMarcel Werk <burntime@woltlab.com>
Fri, 27 Sep 2013 17:32:07 +0000 (19:32 +0200)
wcfsetup/install/files/lib/acp/page/AttachmentPage.class.php

index 2196aa2fa1b620a08835d9e50fe8fad0df591303..21ff9309e1a5d086b378e2d5ab05139e46e65578 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 namespace wcf\acp\page;
 use wcf\data\object\type\ObjectTypeCache;
+use wcf\page\AbstractPage;
 use wcf\system\exception\PermissionDeniedException;
 
 /**
@@ -14,10 +15,17 @@ use wcf\system\exception\PermissionDeniedException;
  * @category   Community Framework
  */
 class AttachmentPage extends \wcf\page\AttachmentPage {
+       /**
+        * @see wcf\page\AbstractPage::$neededPermissions
+        */
+       public $neededPermissions = array('admin.attachment.canManageAttachment');
+       
        /**
         * @see wcf\page\IPage::checkPermissions()
         */
        public function checkPermissions() {
+               AbstractPage::checkPermissions();
+               
                if ($this->attachment->tmpHash) {
                        throw new PermissionDeniedException();
                }