"add new sub-task" link is shown to everyone including anonymous visitors. This link should be visible to roles who have "create task" permission.
Here is a rewrite of tasks_link function: simply added && user_access('create task') to the if statement.
function tasks_link($type, $node = NULL, $teaser = FALSE) {
$links = array();
if ($type == 'node' && $node->type == 'tasks' && user_access('create task')) {
if (!$teaser) {
$links[] = l(t('add new sub-task'), "node/add/tasks",
array('title' => t('Add a new task to this task list')), "edit[parent]=$node->nid");
}
}
return $links;
}
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | tasks.module-diff-2006-05-22-19-47-28.patch | 717 bytes | sanduhrs |
Comments
Comment #1
sanduhrshere is a patch for it.
Comment #2
moonray commentedFixed in CVS.
Comment #3
(not verified) commented