Revision: 1078
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1078&view=rev
Author:   cimorrison
Date:     2009-03-31 11:38:41 +0000 (Tue, 31 Mar 2009)

Log Message:
-----------
Changed getAuthorised checks at the beginning of the page so that they check 
against $max_level if set, otherwise level 2.    This allows multiple levels of 
admins to be introduced (eg booking admins, user admins and system admins).

Modified Paths:
--------------
    mrbs/trunk/web/add.php
    mrbs/trunk/web/admin.php
    mrbs/trunk/web/del.php
    mrbs/trunk/web/edit_area_room.php

Modified: mrbs/trunk/web/add.php
===================================================================
--- mrbs/trunk/web/add.php      2009-03-26 21:23:13 UTC (rev 1077)
+++ mrbs/trunk/web/add.php      2009-03-31 11:38:41 UTC (rev 1078)
@@ -18,7 +18,8 @@
 $capacity = get_form_var('capacity', 'int');
 $type = get_form_var('type', 'string');
 
-if (!getAuthorised(2))
+$required_level = (isset($max_level) ? $max_level : 2);
+if (!getAuthorised($required_level))
 {
   showAccessDenied($day, $month, $year, $area, "");
   exit();

Modified: mrbs/trunk/web/admin.php
===================================================================
--- mrbs/trunk/web/admin.php    2009-03-26 21:23:13 UTC (rev 1077)
+++ mrbs/trunk/web/admin.php    2009-03-31 11:38:41 UTC (rev 1078)
@@ -29,7 +29,8 @@
   $area = get_default_area();
 }
 
-if(!getAuthorised(2))
+$required_level = (isset($max_level) ? $max_level : 2);
+if (!getAuthorised($required_level))
 {
   showAccessDenied($day, $month, $year, $area, "");
   exit();

Modified: mrbs/trunk/web/del.php
===================================================================
--- mrbs/trunk/web/del.php      2009-03-26 21:23:13 UTC (rev 1077)
+++ mrbs/trunk/web/del.php      2009-03-31 11:38:41 UTC (rev 1078)
@@ -28,7 +28,8 @@
   $area = get_default_area();
 }
 
-if (!getAuthorised(2))
+$required_level = (isset($max_level) ? $max_level : 2);
+if (!getAuthorised($required_level))
 {
   showAccessDenied($day, $month, $year, $area, "");
   exit();

Modified: mrbs/trunk/web/edit_area_room.php
===================================================================
--- mrbs/trunk/web/edit_area_room.php   2009-03-26 21:23:13 UTC (rev 1077)
+++ mrbs/trunk/web/edit_area_room.php   2009-03-31 11:38:41 UTC (rev 1078)
@@ -73,7 +73,8 @@
   }
 }
 
-if (!getAuthorised(2))
+$required_level = (isset($max_level) ? $max_level : 2);
+if (!getAuthorised($required_level))
 {
   showAccessDenied($day, $month, $year, $area, "");
   exit();


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to