CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Want page accessible by only one group

Print topic Send  topic

Author Message
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
View profile  Send private message
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
View profile  Send private message
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
View profile  Send private message
Rey
Posted: 01/08/2005, 5:59 PM

Peter:
How do you implement it in ASP?

Thanks.
Rey

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.