Topic: pun_tags does not consider forum permissions.

Again, thanks for this extension.

pun_tags can show post titles from forums which the user does not have access to. To fix this we need to modify the following code in manifest.xml around line 518.

                $query = array(
                    'SELECT'    => 't.id AS tid, t.poster, t.subject, t.first_post_id, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_replies, t.closed, t.sticky, t.forum_id, f.forum_name',
                    'FROM'        => 'topics AS t',
                    'JOINS'        => array(
                        array(
                            'INNER JOIN'    => 'forums AS f',
                            'ON'            => 'f.id=t.forum_id'
                        ),                       
                        array(
                            'LEFT JOIN'        => 'forum_perms AS fp',
                            'ON'            => '(fp.forum_id=f.id AND fp.group_id='.$forum_user['g_id'].')'
                        )                       
                    ),
                    'WHERE'        => 't.id IN('.implode(',', $search_ids).') AND (fp.read_forum IS NULL OR fp.read_forum=1)'
                );

Note the additional join and where clause using forum_perms.

Hope this will be added to the next release.

Warm regards,
Narayan

Re: pun_tags does not consider forum permissions.

We are working on the new version of pun_tags, and users permissions will be taken into account in the next release.

Re: pun_tags does not consider forum permissions.

Slavok wrote:

We are working on the new version of pun_tags, and users permissions will be taken into account in the next release.

Great! Looking forward to it.

Cheers,
Narayan

Re: pun_tags does not consider forum permissions.

The new version of pun_tags is almost done, can you help us to test it out?