VBAjedi
Posts: 34
|
| Posted: 05/20/2004, 10:15 AM |
|
I have my site set up with 10 security groups, with the "Higher level inclusive of lower levels" option turned on.
However, I have one page that I only want group 5 to be able to access. How do I prevent groups 6-10 from accessing the page (without rearranging the order of the groups)?
_________________
VBAjedi
jedi at NOSPAM dot obie dot com |
 |
 |
peterr
Posts: 5971
|
| Posted: 05/20/2004, 12:02 PM |
|
I don't program in PHP and my syntax may be wrong but it would be something like:
If CCGetGroupID() !== 5 {
header("Location: Login.php?ret_link=" . getenv("REQUEST_URI") . "&type=illegalGroup");
}
or
global $Redirect
If CCGetGroupID() !== 5 {
$Redirect = "Login.php?ret_link=" . getenv("REQUEST_URI") . "&type=illegalGroup");
}
I stole the code from the CCSecurityRedirect function in Common.php and if there are problems you could follow the same path.
You would put this code in the "After Initialize" event of your page.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
VBAjedi
Posts: 34
|
| Posted: 05/20/2004, 12:27 PM |
|
Thanks, Peter! Looks like it will do the trick.
_________________
VBAjedi
jedi at NOSPAM dot obie dot com |
 |
 |
Rey
|
| Posted: 01/08/2005, 5:59 PM |
|
Peter:
How do you implement it in ASP?
Thanks.
Rey
|
|
|
 |
|