Commit e13799c9 authored by Gerhard Killesreiter's avatar Gerhard Killesreiter
Browse files

#45988, Nodes with menu items bypass node permissions system, patch by chx.

parent dcfbcf5c
......@@ -946,7 +946,7 @@ function node_menu($may_cache) {
'access' => node_access('view', $node),
'type' => MENU_CALLBACK);
$items[] = array('path' => 'node/'. arg(1) .'/view', 'title' => t('view'),
'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10);
'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10, 'access' => node_access('view', $node));
$items[] = array('path' => 'node/'. arg(1) .'/edit', 'title' => t('edit'),
'callback' => 'node_page',
'access' => node_access('update', $node),
......
......@@ -946,7 +946,7 @@ function node_menu($may_cache) {
'access' => node_access('view', $node),
'type' => MENU_CALLBACK);
$items[] = array('path' => 'node/'. arg(1) .'/view', 'title' => t('view'),
'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10);
'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10, 'access' => node_access('view', $node));
$items[] = array('path' => 'node/'. arg(1) .'/edit', 'title' => t('edit'),
'callback' => 'node_page',
'access' => node_access('update', $node),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment