From de723ba8b5bdf292e757047b341f0759eae6f939 Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Mon, 12 Dec 2005 14:25:45 +0000 Subject: [PATCH] - Patch #40393 by Richard: fixed permissions of URL settings on node submission page. --- modules/menu.module | 2 +- modules/menu/menu.module | 2 +- modules/path.module | 2 +- modules/path/path.module | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/menu.module b/modules/menu.module index c99e8aec0d26..997ddf2ab88f 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 c99e8aec0d26..997ddf2ab88f 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 5ba0060862d5..1a7f7b9a4193 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 5ba0060862d5..1a7f7b9a4193 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', -- GitLab