guest can see the results of the survey, despite a ban.
http://support.simplemachines.org/function_db/index.php?action=view_function;id=527
can you provide more information is it a full ban? post ban? do you have any other ssi mods installed that may interfere with this function? can you provide steps to replicate easier?
yup... we would need more information.
At the moment, based on the description that you have given, I actually don't see a real bug...
1- you make poll result visible to guests
2- you make the poll/results display using SSI
So, why is it a problem that poll results are displayed to guests (banned or not)?
Do note that the only ban that would be effective in that case is IP ban (because he is a guest). If the accesses from another IP, then he's like any other guest (non-banned)
if the voting results can only look after the vote, but guests can still see them
So the ban isn't really important?
Please confirm if this is the scenario:
* Your guests are allowed to view poll results
* Your poll is configured to show results only after the vote
* Normal guests on the forum can't see the results
* Guests via SSI can see the results
Is that it?
* poll is configured to show results only after the vote
* Guests via SSI can see the results (Simple Portal mod)
Quote from: Ρουνικ on February 25, 2015, 10:24:14 AM
do you have any other ssi mods installed that may interfere with this function? can you provide steps to replicate easier?
these are also important a few mods are known to interfere with SSI
also.... can guests actually VOTE?
If they can not vote, then I think they are going to see the results.
I believe that is how the logic works...
And the fact SP is involved may make this an SP bug...
I confirm this.
I create a poll, set it to show results after someone has voted.
I vote and see the results
(http://www.simplemachines.org/community/index.php?action=dlattach;topic=534001.0;attach=240674;image)
A guest cannot see the ongoing results
(http://www.simplemachines.org/community/index.php?action=dlattach;topic=534001.0;attach=240676;image)
Using ssi_showPoll as a guest the result IS SHOWN
(http://www.simplemachines.org/community/index.php?action=dlattach;topic=534001.0;attach=240678;image)
<?php
// Include the SSI file.
require(dirname(__FILE__) . '/SSI.php');
if (!empty($user_info['is_guest']))
echo 'I am a guest </br>';
else
echo 'I am a user! </br>';
ssi_showPoll ($topic=9, $output_method='echo');
?>
This is weird. The code for that function specifically shows results if you're hiding them and the person viewing the poll can't vote...
$allow_view_results = allowedTo('moderate_board') || $row['hide_results'] == 0 || ($row['hide_results'] == 1 && !$allow_vote) || $is_expired;
The code to display the poll in the topic actually takes into account whether or not you've voted. For now you can get rid of the "|| ($row['hide_results'] == 1 && !$allow_vote)" part to prevent it from showing results to those who can't vote. It doesn't fix the issue of showing results if you've already voted, but it'll solve the bigger issue until a proper fix is determined.
Yo Oldiesmann, did you have the time to look into this by any chance? Because it's been nearly 6 months and I was wondering whether you could push a proper fix into 2.0.11 or if it's strictly simpleportal-related (if that is the case, being in Support Team, I'd like to know).
Thanks
I think this is in 2.0.10.
*thumbs up*