Commit aade982b authored by bkosborne's avatar bkosborne Committed by japerry

Issue #2786285 by bkosborne: Access denied 403 when trying to add panel nodes

parent eef5b810
......@@ -72,7 +72,7 @@ function panels_node_menu() {
$items['node/add/panel/choose-layout'] = array(
'title' => 'Choose layout',
'access arguments' => array('create panel-nodes'),
'access callback' => 'panels_add_panel_access_callback',
'page callback' => 'panels_node_add',
'type' => MENU_CALLBACK,
);
......@@ -91,6 +91,13 @@ function panels_node_edit_node($node) {
return node_access('update', $node);
}
/**
* Access callback to determine if user has access to add panel nodes.
*/
function panels_add_panel_access_callback() {
return user_access('create panel content') || user_access('administer panel-nodes');
}
/**
* Override of node add page to force layout selection prior
* to actually editing a 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