Revision: 2148
http://mrbs.svn.sourceforge.net/mrbs/?rev=2148&view=rev
Author: cimorrison
Date: 2011-10-25 09:35:32 +0000 (Tue, 25 Oct 2011)
Log Message:
-----------
Fixed bug. $auth['only_admin_can_book'] does not work as required if
$auth['deny_public_access'] is set.
Modified Paths:
--------------
mrbs/trunk/web/mrbs_auth.inc
Modified: mrbs/trunk/web/mrbs_auth.inc
===================================================================
--- mrbs/trunk/web/mrbs_auth.inc 2011-10-24 21:17:02 UTC (rev 2147)
+++ mrbs/trunk/web/mrbs_auth.inc 2011-10-25 09:35:32 UTC (rev 2148)
@@ -30,8 +30,8 @@
$page_level['approve_entry_handler.php'] = 1; // Ordinary users are allowed
to remind admins
$page_level['del_entry.php'] = 1; // Ordinary users can delete
their own entries
$page_level['edit_area_room.php'] = 1; // Ordinary users can view room
details
-$page_level['edit_entry.php'] = 1; // Ordinary users can edit
their own entries
-$page_level['edit_entry_handler.php'] = 1; // Ordinary users can edit
their own entries
+$page_level['edit_entry.php'] = ($auth['only_admin_can_book']) ? 2
: 1;
+$page_level['edit_entry_handler.php'] = ($auth['only_admin_can_book']) ? 2
: 1;
$page_level['edit_users.php'] = 1; // Ordinary users can edit
their own details
$page_level['pending.php'] = 1; // Ordinary users can view
their own entries
@@ -53,8 +53,6 @@
*/
function getAuthorised($level)
{
- global $auth;
-
// If the minimum level is zero (or not set) then they are
// authorised, whoever they are
if (empty($level))
@@ -70,11 +68,6 @@
return 0;
}
- if (isset($auth['only_admin_can_book']) && $auth['only_admin_can_book'])
- {
- $level = 2;
- }
-
return authGetUserLevel($user) >= $level;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits