New FarCry security tag

Whilst doing some refactoring of the webtop login I have added a new tag... see it in action below... I'm sure you can think of a thousand ways to use it in your project.

NOTE: It seems comments are stripped out so if anyone knows how to keep them in the code blocks... power to ya.

OLD AND BUSTED
<cfif not application.security.checkPermission("Admin")>        <cfset application.factory.oAuthentication.logout() />        <cfif not ListContains( cgi.script_name, "#application.url.farcry#/login.cfm" )>               <extjs:bubble message="You do not have permission to access the webtop" />               <cflocation url="#application.url.farcry#/login.cfm?returnUrl=#replace(URLEncodedFormat(cgi.script_name&'?'&cgi.query_string),'##','%23','ALL')#" addtoken="No">               <cfabort>        </cfif> </cfif>

NEW HOTNESS
<cfif not findNoCase( "login.cfm", cgi.script_name )>      <sec:checkLoggedIn />      <sec:checkLoggedIn lPermissions="admin" message="You do not have permission to access the webtop" /> </cfif>

1679 views and 0 responses