Page Access Rules
I'm getting my feet wet in utilizing the actual Page Access Rules in Security Assist. I'm having some trouble with defining a value.
Let me explain...
In my users table I have a field that I am designating to provide each user with specific access levels... 1, 2 or 3.
Level 1 = basic
Level 2 = editor
Level 3 = admin
I need to be able to authenticate the following (2) rules on specific pages.
1. Are they logged in?
* yes - proceed
* no - go back to login page
This activity is pretty easy to setup and I have it working great! :D
2. Do they have Editor level access?
* yes - access granted to special pages
* no - deny access and send to basic page
I have played with this and it doesn't appear that the rules are kicking in... If you're logged in, you have access to all activites.
<?php require_once( "WA_SecurityAssist/Helper_PHP.php" ); ?>
<?php
if (!WA_Auth_RulePasses("Logged in to users")){
WA_Auth_RestrictAccess("login.php");
}
if (!WA_Auth_RulePasses("Editor")){
WA_Auth_RestrictAccess("editor_page.php");
}
?>
In the actual Editor rule I've got the following...
Allow IF <?php echo $row_getUsers['status']; ?> = 2
Is this the proper way to perform this authentication activity?