Add user.profile.payment.canBuyPaidSubscription permission
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 6 Jul 2020 10:26:52 +0000 (12:26 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 6 Jul 2020 10:26:52 +0000 (12:26 +0200)
Resolves #3253

com.woltlab.wcf/page.xml
com.woltlab.wcf/userGroupOption.xml
com.woltlab.wcf/userMenu.xml
wcfsetup/install/files/lib/page/PaidSubscriptionListPage.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index bd765df539729830c0a16e9d696a6539983e5860..ea92409be16c1514edd2bd39164593db3fdbc3a9 100644 (file)
                        <hasFixedParent>1</hasFixedParent>
                        <parent>com.woltlab.wcf.AccountManagement</parent>
                        <options>module_paid_subscription</options>
+                       <permissions>user.profile.payment.canBuyPaidSubscription</permissions>
                        <content language="en">
                                <title>Paid Subscriptions</title>
                        </content>
index 81f26c995cfb48842df58e47ddc60210cbb709cc..e55f94ad1649af6e8e7a33d876a3d4196981e025 100644 (file)
@@ -21,6 +21,9 @@
                        <category name="user.profile.trophy">
                                <parent>user.profile</parent>
                        </category>
+                       <category name="user.profile.payment">
+                               <parent>user.profile</parent>
+                       </category>
                        <category name="user.message">
                                <parent>user</parent>
                        </category>
@@ -809,6 +812,13 @@ png</defaultvalue>
                                <minvalue>0</minvalue>
                                <usersonly>1</usersonly>
                        </option>
+                       <option name="user.profile.payment.canBuyPaidSubscription">
+                               <categoryname>user.profile.payment</categoryname>
+                               <optiontype>boolean</optiontype>
+                               <defaultvalue>1</defaultvalue>
+                               <options>module_paid_subscription</options>
+                               <usersonly>1</usersonly>
+                       </option>
                        <!-- /user.profile -->
                        <option name="user.page.canAddComment">
                                <categoryname>user.page</categoryname>
index caaa8a7b38987583b81f2c92f215f36c6e36683c..0bca42fdb92f8a3dfa47e1464779f08407e14166 100644 (file)
@@ -37,6 +37,7 @@
                        <controller>wcf\page\PaidSubscriptionListPage</controller>
                        <parent>wcf.user.menu.settings</parent>
                        <options>module_paid_subscription</options>
+                       <permissions>user.profile.payment.canBuyPaidSubscription</permissions>
                </usermenuitem>
                <!-- /settings -->
                <!-- community -->
index 714744357dcf807ed9b59509800545d480a62f77..5e2fe27e1efbf29a0bc54741dde6115d61366c32 100644 (file)
@@ -25,6 +25,11 @@ class PaidSubscriptionListPage extends AbstractPage {
         */
        public $neededModules = ['MODULE_PAID_SUBSCRIPTION'];
        
+       /**
+        * @inheritDoc
+        */
+       public $neededPermissions = ['user.profile.payment.canBuyPaidSubscription'];
+       
        /**
         * list of available paid subscriptions
         * @var array
index 84acf9d36ea32350a319ecd918fe783f19f72848..f8da41a417acc6fdeb73de006e6298f2bfd191fc 100644 (file)
@@ -880,6 +880,8 @@ ACHTUNG: Die oben genannten Meldungen sind stark gekürzt. Sie können Details z
                <item name="wcf.acp.group.option.user.profile.trophy.canSeeTrophies"><![CDATA[Kann Trophäen sehen]]></item>
                <item name="wcf.acp.group.option.user.profile.trophy.maxUserSpecialTrophies"><![CDATA[Maximale Anzahl an besonderen Trophäen]]></item>
                <item name="wcf.acp.group.option.user.profile.trophy.maxUserSpecialTrophies.description"><![CDATA[Besondere Trophäen können vom Benutzer individuell ausgewählt werden und werden in der Message-Sidebar und im Benutzerprofil angezeigt.]]></item>
+               <item name="wcf.acp.group.option.category.user.profile.payment"><![CDATA[Zahlungsoptionen]]></item>
+               <item name="wcf.acp.group.option.user.profile.payment.canBuyPaidSubscription"><![CDATA[Kann bezahlte Mitgliedschaften kaufen]]></item>
                <item name="wcf.acp.group.option.category.user.profile.coverPhoto"><![CDATA[Titelbilder]]></item>
                <item name="wcf.acp.group.option.user.profile.coverPhoto.canSeeCoverPhotos"><![CDATA[Kann Titelbilder sehen]]></item>
                <item name="wcf.acp.group.option.user.profile.coverPhoto.canUploadCoverPhoto"><![CDATA[Kann eigenes Titelbild hochladen]]></item>
index cc66fa176d0caea5632ad403d08906ef0a8ffd88..bc23658e03d61e495d1f47f99d10dda688af72f0 100644 (file)
@@ -856,6 +856,8 @@ ATTENTION: The messages listed above are greatly shortened. You can view details
                <item name="wcf.acp.group.option.user.profile.trophy.canSeeTrophies"><![CDATA[Can see trophies]]></item>
                <item name="wcf.acp.group.option.user.profile.trophy.maxUserSpecialTrophies"><![CDATA[Maximum number of special trophies]]></item>
                <item name="wcf.acp.group.option.user.profile.trophy.maxUserSpecialTrophies.description"><![CDATA[Special trophies can be individually selected by the user and displayed in the message sidebar and the user profile.]]></item>
+               <item name="wcf.acp.group.option.category.user.profile.payment"><![CDATA[Payment]]></item>
+               <item name="wcf.acp.group.option.user.profile.payment.canBuyPaidSubscription"><![CDATA[Can buy paid subscriptions]]></item>
                <item name="wcf.acp.group.option.category.user.profile.coverPhoto"><![CDATA[Cover Photos]]></item>
                <item name="wcf.acp.group.option.user.profile.coverPhoto.canSeeCoverPhotos"><![CDATA[Can view  users’ cover photos]]></item>
                <item name="wcf.acp.group.option.user.profile.coverPhoto.canUploadCoverPhoto"><![CDATA[Can upload their cover photo]]></item>