summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbkosborne2016-08-18 23:43:30 (GMT)
committerJakob Perry2016-08-18 23:43:30 (GMT)
commitaade982b80a95a4f8814b136639a71c0ae1d05ff (patch)
treea5e84679e2904ef8eb4dca8bf9c8b095b2b98b4d
parenteef5b810d51854ad7edfb73e109091458682b94f (diff)
Issue #2786285 by bkosborne: Access denied 403 when trying to add panel nodes
-rw-r--r--panels_node/panels_node.module9
1 files changed, 8 insertions, 1 deletions
diff --git a/panels_node/panels_node.module b/panels_node/panels_node.module
index 4b33e7f..bc9d56f 100644
--- a/panels_node/panels_node.module
+++ b/panels_node/panels_node.module
@@ -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,
);
@@ -92,6 +92,13 @@ function panels_node_edit_node($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.
*/