including security on custom PS pages
I've done a lot of customization of a Power Store installation. Now I've made some pages in the admin folder so that the clients can easily make changes to some of the options. I put these pages in the admin folder and want to make sure that they're secure. I tried adding this code to the top of each page:
<?php require_once( "../WA_SecurityAssist/Helper_PHP.php" ); if (!session_id()) session_start();?>
<?php
if (!WA_Auth_RulePasses("Administrator")){
WA_Auth_RestrictAccess("index.php");
}
?>
I thought that would make it use the same security rules as the rest of the admin part of the store. However, when I try to follow a link to one of these pages, I get an error message from my browser (Chrome):
Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.
What am I missing about how to apply security to these pages? I also tried doing it by clicking WebAssist>SecurityAssist>Secure page
It didn't recognize that there were security rules already defined that could be used. This is probably because Power Store is not installed in the root directory.
Suggestions?