Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-10447

MCP > Forum > "copy" and "resync" actions always available (not bound to any permission)

    XMLWordPrintable

Details

    Description

      I caught a little inconsistency and need help from someone who knows if this is intentional:

      if a user has at least one moderator permission, he is able to go to the MCP. That means, when viewing a topic, there is the "Quick-mod tools" combobox with at least the option "View logs". This is because of this code from /viewtopic.php:

      $topic_mod .= ($auth->acl_get('m_', $forum_id)) ? '<option value="topic_logs">' . $user->lang['VIEW_TOPIC_LOGS'] . '</option>' : '';


      So far, so good. Now the user is in the MCP and can go to the "Main" tab, then "View forum" tab. There we have the "Select desired action" combobox. In /includes/mcp/mcp_forum.php all combobox options are compiled based on the permissions:

          $template->assign_vars(array(
      ...
              'S_CAN_REPORT'            => $auth->acl_get('m_report', $forum_id),
              'S_CAN_DELETE'            => $auth->acl_get('m_delete', $forum_id),
              'S_CAN_MERGE'            => $auth->acl_get('m_merge', $forum_id),
              'S_CAN_MOVE'            => $auth->acl_get('m_move', $forum_id),
              'S_CAN_FORK'            => $auth->acl_get('m_', $forum_id),
              'S_CAN_LOCK'            => $auth->acl_get('m_lock', $forum_id),
              'S_CAN_SYNC'            => $auth->acl_get('m_', $forum_id),
              'S_CAN_APPROVE'            => $auth->acl_get('m_approve', $forum_id),
      ...
          ));

      S_CAN_FORK and S_CAN_SYNC are always available. Why?

      In /viewtopic.php the FORK is bound to the m_move permission:

      $topic_mod .= ($auth->acl_get('m_move', $forum_id)) ? '<option value="fork">' . $user->lang['FORK_TOPIC'] . '</option>' : '';

      ...so it doesn't show up as available option there. But in the MCP no concrete permission is needed at all. Same for the SYNC.

      Is this intended?
      Shouldn't forking a topic be bound to m_move and another concrete permission exist for resyncing (i.e. m_sync)?

      area51 topic

      Attachments

        Activity

          People

            CHItA CHItA
            AmigoJack AmigoJack
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: