Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

restrict access to page

Status
Not open for further replies.

cflearning

Technical User
Mar 1, 2001
10
CA
I'm using ultra dev 4.01 and can't get the server behaviour of restrict access to page to do anything much at all. In IE, it simply shows the cf code and the page beneath. In netscape, you move directly to the page with no trouble. I'm using a simple access database to authenticate users -- this is working fine. It's the page that I'm authenticating to that is the problem -- type in the url and you're there even though restrict access is in place

Here's the goods:
<cfscript>
<cfapplication name=&quot;name&quot;
sessionmanagement=&quot;yes&quot;>
// *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers=&quot;&quot;;
MM_authFailedURL=&quot;../failedlogin.cfm&quot;;
MM_grantAccess=false;
MM_Session = IIf(IsDefined(&quot;Session.MM_Username&quot;),&quot;Session.MM_Username&quot;,DE(&quot;&quot;));
if (MM_Session IS NOT &quot;&quot;) {
if (true OR (Session.MM_UserAuthorization IS &quot;&quot;) OR (Find(Session.MM_UserAuthorization, MM_authorizedUsers) GT 0)) {
MM_grantAccess = true;
}
}
if (NOT MM_grantAccess) {
MM_qsChar = &quot;?&quot;;
if (Find(&quot;?&quot;,MM_authFailedURL) GT 0) MM_qsChar = &quot;&&quot;;
MM_referrer = CGI.SCRIPT_NAME;
if (CGI.QUERY_STRING IS NOT &quot;&quot;) MM_referrer = MM_referrer & &quot;?&quot; & CGI.QUERY_STRING;
MM_authFailedURL_Trigger = MM_authFailedURL & MM_qsChar & &quot;accessdenied=&quot; & URLEncodedFormat(MM_referrer);
}
</cfscript>
<cfif IsDefined(&quot;MM_authFailedURL_Trigger&quot;)>
<cflocation url=&quot;#MM_authFailedURL_Trigger#&quot; addtoken=&quot;no&quot;>
</cfif>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top