diff --git a/modules/menu.module b/modules/menu.module index c99e8aec0d26bed26711ef0b18a40bb848503ab2..997ddf2ab88f8596cb9e578f497dddbf0ed21f0d 100644 --- a/modules/menu.module +++ b/modules/menu.module @@ -642,7 +642,7 @@ function menu_parent_options($mid, $pid = 0, $depth = 0) { * Add menu item fields to the node form. */ function menu_form_alter($form_id, &$form) { - if (isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) { + if (user_access('administer menu') && isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) { $edit = isset($_POST['edit']) ? $_POST['edit'] : ''; $edit['nid'] = $form['nid']['#value']; diff --git a/modules/menu/menu.module b/modules/menu/menu.module index c99e8aec0d26bed26711ef0b18a40bb848503ab2..997ddf2ab88f8596cb9e578f497dddbf0ed21f0d 100644 --- a/modules/menu/menu.module +++ b/modules/menu/menu.module @@ -642,7 +642,7 @@ function menu_parent_options($mid, $pid = 0, $depth = 0) { * Add menu item fields to the node form. */ function menu_form_alter($form_id, &$form) { - if (isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) { + if (user_access('administer menu') && isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) { $edit = isset($_POST['edit']) ? $_POST['edit'] : ''; $edit['nid'] = $form['nid']['#value']; diff --git a/modules/path.module b/modules/path.module index 5ba0060862d5450065d6d0dfa399cd379d4cd95c..1a7f7b9a41937de0e4018567e2307c175a850cda 100644 --- a/modules/path.module +++ b/modules/path.module @@ -219,7 +219,7 @@ function path_nodeapi(&$node, $op, $arg) { * Implementation of hook_form_alter(). */ function path_form_alter($form_id, &$form) { - if (isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) { + if (user_access('create url aliases') && isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) { $path = $form['#node']->path; $form['path'] = array( '#type' => 'fieldset', diff --git a/modules/path/path.module b/modules/path/path.module index 5ba0060862d5450065d6d0dfa399cd379d4cd95c..1a7f7b9a41937de0e4018567e2307c175a850cda 100644 --- a/modules/path/path.module +++ b/modules/path/path.module @@ -219,7 +219,7 @@ function path_nodeapi(&$node, $op, $arg) { * Implementation of hook_form_alter(). */ function path_form_alter($form_id, &$form) { - if (isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) { + if (user_access('create url aliases') && isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id) { $path = $form['#node']->path; $form['path'] = array( '#type' => 'fieldset',