Jump to content

Edit tags should check on edit_topic and not edit_post


TSP

Recommended Posts

Hi,

i see in the code for the edit/remove tag, you have this:

case 'edit':
            case 'remove':
                if ( $this->memberData['member_id'] == $topic['starter_id'] or $this->memberData['g_is_supmod'] or ( $this->memberData['is_mod'] and isset( $this->memberData['forumsModeratorData'][ $forum['id'] ] ) and $this->memberData['forumsModeratorData'][ $forum['id'] ]['edit_post'] ) )
                {
                    return true;
                }
            break;

But it would make more sense for it to check on edit_topic.

The reason I'm taking this up is because we have this modification installed: '?do=embed' frameborder='0' data-embedContent>>

Which lets us have a multimod that can add tags to the topic. This lets us tag all the topics with a certain tag before we move them from the forum to be removed.

But we have a limited forum moderator group that can only edit topic titles, move topics etc. this means that when doing the multimod action that should add the tag, it fails, because it requires edit_post privilige. Something that doesn't make much sense in my head.

Link to comment
Share on other sites

  • 2 weeks later...
$this->memberData['member_id'] == $topic['starter_id']
 or
$this->memberData['g_is_supmod']
 or
(    $this->memberData['is_mod']
     and
     isset( $this->memberData['forumsModeratorData'][ $forum['id'] ] )
     and 
     (        $this->memberData['forumsModeratorData'][ $forum['id'] ]['edit_post']
              or
             (     is_array( $displayData['multi_mod'] )
                   AND
                   count( $displayData['multi_mod'] )
             )
     )
)

you can try it edit... but you must define a $displayData because it work sure for topicviewtemplate and I don't sure work outside it

Link to comment
Share on other sites

or sure use can_mm

$this->memberData['member_id'] == $topic['starter_id']
 or
$this->memberData['g_is_supmod']
 or
(    $this->memberData['is_mod']
     and
     isset( $this->memberData['forumsModeratorData'][ $forum['id'] ] )
     and 
     (        $this->memberData['forumsModeratorData'][ $forum['id'] ]['edit_post']
              or
              $this->memberData['forumsModeratorData'][ $forum['id'] ]['can_mm']
     )
)
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...