Update of /cvsroot/upcase-project/UpCase/lib
In directory usw-pr-cvs1:/tmp/cvs-serv30931
Modified Files:
uc_page.php
Log Message:
moved all group id from -1 to 1
Index: uc_page.php
===================================================================
RCS file: /cvsroot/upcase-project/UpCase/lib/uc_page.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** uc_page.php 5 Aug 2002 08:35:02 -0000 1.2
--- uc_page.php 12 Nov 2002 13:51:59 -0000 1.3
***************
*** 42,45 ****
--- 42,46 ----
{
header("Location: " . $uc_info["objectRegistered"]);
+ exit();
}
}
***************
*** 49,54 ****
function open($forceLogin = false)
{
! global $username;
! global $password;
global $uc_info;
global $uc_lang;
--- 50,55 ----
function open($forceLogin = false)
{
! // global $username;
! // global $password;
global $uc_info;
global $uc_lang;
***************
*** 64,68 ****
// group _all_ don't need to go further, let the page display
// (if it is not visible only by admins of course)
! if (in_array(-1, $this->perms)
&& !in_array(0, $this->perms)
&& !$forceLogin)
--- 65,69 ----
// group _all_ don't need to go further, let the page display
// (if it is not visible only by admins of course)
! if (in_array(1, $this->perms)
&& !in_array(0, $this->perms)
&& !$forceLogin)
***************
*** 74,78 ****
// Now, get user owning the session
$user = $this->session->getUser();
-
// get user's secondary groups gid
$userGroups = $user->groups;
--- 75,78 ----
***************
*** 84,87 ****
--- 84,88 ----
$uc_lang = $user->lang;
// is it an admin ?
+
if (in_array(0, $userGroups))
{
***************
*** 100,104 ****
// or is the page accessible by everybody ?
if (count(array_intersect($userGroups, $this->perms)) > 0
! || in_array(-1, $this->perms))
{
// yes, access granted and user logged in
--- 101,105 ----
// or is the page accessible by everybody ?
if (count(array_intersect($userGroups, $this->perms)) > 0
! || in_array(1, $this->perms))
{
// yes, access granted and user logged in
|