Fixed permission for public polls not being considered for display
authorAlexander Ebert <ebert@woltlab.com>
Wed, 25 Feb 2015 12:45:35 +0000 (13:45 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 25 Feb 2015 12:45:35 +0000 (13:45 +0100)
The permission is correctly enforced, but the option was available in the template nonetheless.

com.woltlab.wcf/coreObject.xml
com.woltlab.wcf/templates/__messageFormPoll.tpl

index fec7b8fbd2f7ffef7b556065699dd04852cfe433..c9c74f3afda6be3948d2bb224baf8171a4c50dd5 100644 (file)
@@ -61,5 +61,9 @@
                <coreobject>
                        <objectname><![CDATA[wcf\data\smiley\SmileyCache]]></objectname>
                </coreobject>
+               
+               <coreobject>
+                       <objectname><![CDATA[wcf\system\poll\PollManager]]></objectname>
+               </coreobject>
        </import>
 </data>
index 608aae0664fae8d33d2a121f0879da01aa95652a..78a905e7294af87271acdea327a370cafac947f3 100644 (file)
@@ -65,7 +65,7 @@
                                <dd>
                                        <label><input type="checkbox" name="pollIsChangeable" value="1"{if $pollIsChangeable} checked="checked"{/if} /> {lang}wcf.poll.isChangeable{/lang}</label>
                                </dd>
-                               {if !$pollID}
+                               {if !$pollID && $__wcf->getPollManager()->canStartPublicPoll()}
                                        <dd>
                                                <label><input type="checkbox" name="pollIsPublic" value="1"{if $pollIsPublic} checked="checked"{/if} /> {lang}wcf.poll.isPublic{/lang}</label>
                                        </dd>