MyBB Community Forums

Full Version: [F] canviewthreads and forum list [C-Michael83]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Reference: http://community.mybboard.net/thread-431...#pid298546

If you have a forum set for "Can view forum?" to yes but "Can view threads within forum?" to no you can still see the thread list if you enter the forum.
Are you sure it's not just because of your admin permissions?
No, because I changed the permissions for the unregistered group. The screenshots were taken as a guest user.
That setting is just so that the user cannot read the thread no?
Because if you click on the thread it usually gives an error.
Haven't bothered trying anything, but guessing this is all you need to do:
forumdisplay.php
Replace
if($fpermissions['canview'] != 1)
with
if($fpermissions['canview'] != 1 || $fpermissions['canviewthreads'] != 1)

The fix in the previous thread is causing the lock status, because:
			if($forum['password'] != '' && $mybb->cookies['forumpass'][$forum['fid']] != md5($mybb->user['uid'].$forum['password'])  || $permissions['canviewthreads'] !=1)
			{
				$hideinfo = true;
			}
$hideinfo is sent as the locked status
$lightbulb = get_forum_lightbulb($forum, $lastpost_data, $hideinfo);
function get_forum_lightbulb($forum, $lastpost, $locked=0)
{
	global $mybb, $lang, $db, $unread_forums;

	// This forum is closed, so override the folder icon with the "offlock" icon.
	if($forum['open'] == 0 || $locked)
	{
		$folder = "offlock";
		$altonoff = $lang->forum_locked;
	}
Fix should be easy, so I'll leave it up to you Toungue
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group
Not sure if this has been updated in the latest revision but I can still reproduce.
Erm, it's been fixed in the SVN and I already had another staff member confirm the fix working. Are you sure your following the reproduction instructions properly and that your seeing a list of threads?
Yup. I set the Can View Forums to yes and the can view threads to no, I was able to view the list of threads as well as click on them and view the contents. I just tried it numerous times and I still can reproduce the problem. Undecided
Imad, make sure your using the latest revision and that your trying this from a normal member's user account.
Pages: 1 2