r1980 + lots of adjustments to fit the new RackCode authorization framework
[racktables] / process.php
1 <?php
2
3 require 'inc/init.php';
4 fixContext();
5
6 if (empty ($op) or !isset ($ophandler[$pageno][$tabno][$op]))
7 {
8 showError ("Invalid request in operation broker: page '${pageno}', tab '${tabno}', op '${op}'");
9 die();
10 }
11
12 // We have a chance to handle an error before starting HTTP header.
13 $location =
14 permitted() ?
15 $ophandler[$pageno][$tabno][$op]() :
16 buildRedirectURL ($pageno, $tabno, 'error', 'Operation not permitted!');
17 header ("Location: " . $location);
18
19 ?>