Commit de723ba8 authored by Dries's avatar Dries
Browse files

- Patch #40393 by Richard: fixed permissions of URL settings on node submission page.

parent 477028c2
......@@ -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'];
......
......@@ -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'];
......
......@@ -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',
......
......@@ -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',
......
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