From: Tony Mack Date: Thu, 25 Feb 2010 22:28:34 +0000 (+0000) Subject: redirect pi's and techs to register wizard. only display 'Insuffieient privs' error... X-Git-Tag: PLEWWW-4.3-42~3 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=9a2cf6f561de3a8be79e2d6ada5c73f3a7a42b56;p=plewww.git redirect pi's and techs to register wizard. only display 'Insuffieient privs' error to users' --- diff --git a/planetlab/nodes/node_add.php b/planetlab/nodes/node_add.php index 98aa70e..5bb4796 100644 --- a/planetlab/nodes/node_add.php +++ b/planetlab/nodes/node_add.php @@ -18,7 +18,12 @@ require_once 'form.php'; // if not a admin, pi, or tech then redirect to node index // xxx does not take site into account $has_privileges=plc_is_admin(); +$is_pi_or_tech=plc_is_pi() || plc_is_tech(); if( ! $has_privileges) { + if ( $is_pi_or_tech) { + drupal_goto(l_register_node()); + return 0; + } drupal_set_error ("Insufficient provileges to add a node"); header( "index.php" ); return 0;