From: Marcel Werk Date: Fri, 5 May 2017 15:21:40 +0000 (+0200) Subject: Non-activated users no longer can purchase paid subscriptions X-Git-Tag: 2.1.15~5^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=42f7737a41be9f6a020e62fceadb3c0b4f6b3dcd;p=GitHub%2FWoltLab%2FWCF.git Non-activated users no longer can purchase paid subscriptions --- diff --git a/wcfsetup/install/files/lib/page/PaidSubscriptionListPage.class.php b/wcfsetup/install/files/lib/page/PaidSubscriptionListPage.class.php index a7e5d54a8f..6eb9849269 100644 --- a/wcfsetup/install/files/lib/page/PaidSubscriptionListPage.class.php +++ b/wcfsetup/install/files/lib/page/PaidSubscriptionListPage.class.php @@ -2,6 +2,7 @@ namespace wcf\page; use wcf\data\paid\subscription\user\PaidSubscriptionUserList; use wcf\system\cache\builder\PaidSubscriptionCacheBuilder; +use wcf\system\exception\PermissionDeniedException; use wcf\system\menu\user\UserMenu; use wcf\system\WCF; @@ -38,6 +39,17 @@ class PaidSubscriptionListPage extends AbstractPage { */ public $userSubscriptionList = array(); + /** + * @see \wcf\page\AbstractPage::checkPermissions() + */ + public function checkPermissions() { + parent::checkPermissions(); + + if (WCF::getUser()->activationCode != 0) { + throw new PermissionDeniedException(); + } + } + /** * @see \wcf\page\AbstractPage::readData() */