rules question
I have 2 php pages both setup with page restrictions using rules to allow or deny a user accessing them ...
<?php
if (!WA_Auth_RulePasses("Logged in to Assets and Active")){
WA_Auth_RestrictAccess("../uac-errors.php");
}
?>
When a user logs in, 2 access sessions (SAusrPAGESTP and SAusrPAGEDEVICE) are set using the value in the users account.
I can enable or disable access to any page for each user using a check box value 1 = allow, 0 = deny.
if i setup the rule using just one session, page access functions as expected, and if i edit the page access (in admin pages) by switching between allow and deny, that too functions as expected
Below is extracted from the helpergroupsrulesphp.php
case "Logged in to Assets and Active":
$comparisons[0] = array(FALSE, "".((isset($_SESSION['SAusrPAGESTP']))?$_SESSION['SAusrPAGESTP']:"") ."", 2, "1");
$comparisons[1] = array(TRUE, "".((isset($_SESSION['SecurityAssist_usrID']))?$_SESSION['SecurityAssist_usrID']:"") ."", 6, "1");
$comparisons[2] = array(TRUE, "".((isset($_SESSION['SAusrSTATUS']))?$_SESSION['SAusrSTATUS']:"") ."", 1, "2");
However if i add a second rule, as shown below, the rule breaks and access is denied to both pages
case "Logged in to Assets and Active":
$comparisons[0] = array(FALSE, "".((isset($_SESSION['SAusrPAGESTP']))?$_SESSION['SAusrPAGESTP']:"") ."", 2, "1");
$comparisons[1] = array(FALSE, "".((isset($_SESSION['SAusrPAGEDEVICE']))?$_SESSION['SAusrPAGEDEVICE']:"") ."", 2, "1");
$comparisons[2] = array(TRUE, "".((isset($_SESSION['SecurityAssist_usrID']))?$_SESSION['SecurityAssist_usrID']:"") ."", 6, "1");
$comparisons[3] = array(TRUE, "".((isset($_SESSION['SAusrSTATUS']))?$_SESSION['SAusrSTATUS']:"") ."", 1, "2");
Where am i going wrong?
Do i need to create a separate rule for each page?