MCP > Forum > "copy" and "resync" actions always available

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Post Reply
User avatar
AmigoJack
Registered User
Posts: 110
Joined: Wed May 04, 2011 7:47 pm
Location: グリーン ヒル ゾーン
Contact:

MCP > Forum > "copy" and "resync" actions always available

Post by AmigoJack »

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:

Code: Select all

$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:

Code: Select all

    $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:

Code: Select all

$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)?

User avatar
tbackoff
Registered User
Posts: 180
Joined: Sat Jun 12, 2010 3:25 am

Re: MCP > Forum > "copy" and "resync" actions always availab

Post by tbackoff »

FORK allows you to copy a topic (I just did this topic). I'm assuming it's available because you will be copying it to another forum. I'm not sure about RESYNC though.

User avatar
AmigoJack
Registered User
Posts: 110
Joined: Wed May 04, 2011 7:47 pm
Location: グリーン ヒル ゾーン
Contact:

Re: MCP > Forum > "copy" and "resync" actions always availab

Post by AmigoJack »

I know what it does - I asked for the intention on why it is not bound to a permission, like deleting, moving, locking etc... a topic is bound to concrete permissions. Copying a topic is always allowed (whether it's possible was never of interest). There is no possibility to deny copying a topic (other than denying all moderator permissions).

I guess I should just open a ticket. Thanks, Tab. ;)

User avatar
tbackoff
Registered User
Posts: 180
Joined: Sat Jun 12, 2010 3:25 am

Re: MCP > Forum > "copy" and "resync" actions always availab

Post by tbackoff »

Sorry, I must not have been clear. When i said "I'm assuming it's available because you will be copying it to another forum", that was my reason for the intention of allowing copying.
AmigoJack wrote:I guess I should just open a ticket. Thanks, Tab. ;)
Yes, please.

Post Reply