change permissions for trackback-settings

ositoblanco - June 2, 2009 - 23:49
Project:TrackBack
Version:6.x-1.2
Component:Other
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi, i think the users who are allowed to administer the Trackbacks should not be automatically able to change the trackback settings. Therefore I suggest to change the access arguments in the menu hook. Also the permission 'change node trackback setting' doesn't make sense if you don't check it for the settings form, because IMHO you have the possibility to change permissions for content types (and so also for nodes) ... thats why I tagged this as bug report instead of feature request.

At the moment I use this until there is a fix.

<?php
  $items
['admin/content/trackback/settings'] = array(
   
'title' => 'Settings',
   
'page arguments' => array('trackback_configure'),
   
'access arguments' => array('administer trackbacks', 'change node trackback setting'),
   
'weight' => 10,
   
'type' => MENU_LOCAL_TASK
 
);
?>

#1

ositoblanco - June 3, 2009 - 00:05

Sorry may fault, use only permissions 'change node trackback setting' (or if needed new permission 'administer trackback setting'):

<?php
  $items
['admin/content/trackback/settings'] = array(
   
'title' => 'Settings',
   
'page arguments' => array('trackback_configure'),
   
'access arguments' => array('change node trackback setting'),
   
'weight' => 10,
   
'type' => MENU_LOCAL_TASK
 
);
?>

#2

MentalFS - August 14, 2009 - 12:38

I made that change, but it didn't have any effect, strangely. Edit: Okay, rebuilding the permissions did the trick.

It should be possible, like in comments, to have trackback "moderators" that can publish, unpublish and delete trackbacks and manage the moderation queue. If I understand it right, this is what should happen with this patch. Edit: As I see now, it is exactly what I meant.

Maybe the names of the permissions should change though.

 
 

Drupal is a registered trademark of Dries Buytaert.