redirect pi's and techs to register wizard. only display 'Insuffieient privs' error...
authorTony Mack <tmack@cs.princeton.edu>
Thu, 25 Feb 2010 22:28:34 +0000 (22:28 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Thu, 25 Feb 2010 22:28:34 +0000 (22:28 +0000)
planetlab/nodes/node_add.php

index 98aa70e..5bb4796 100644 (file)
@@ -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;