Protect a directory??
Posted on 2003-03-20
I am trying to protect my useradmin directory by placing a query in an Application.cfm file to determine if someone has access to that directory or not. If they do, they can proceed as normal, if not, I want to redirect them and let them know they do not have access.
However, I am not having luck doing this. I think I have the query right, but not the if statement. Does anyone have any thoughts on how to fix? Thanks.
Here is my Application.cfm
<cfquery name="usersec" datasource="database">
WHERE (UserId = #session.userid#
and UserAccess.SystemCode = 3)
<cfif not isdefined("userid")>