Hello!

I'm trying to run thru the security example I found online for model
glue.  It appears as it's written it works only for CF9.  As I'm using
CF8 I decided to go thru it line by line and get rid of the cfscript
while I'm at it.  Where I'm stuck is the following function
"checkaccess".  Question is on the var "IsAuthorized" - is it supposed
ot be there?  It's a local var and I don't see where it's used.


         <cffunction name="checkAccess" access="Public"
returnType="void" output="false">
                <cfset var authorizedRoles =
arguments.event.getArgument("authorizedRoles", "*") />
                <cfset var isAuthorized = false />

                <!--- Is the current user logged in?  --->
                <cfif not beans.loginSessionManager.isLoggedIn() >
                        <cfset arguments.event.addResult("NotLoggedIn") />
                        <cfreturn>
         </cfif>
                <!--- An authorizedRoles argument of "*" means any logged-in
user is authorized --->
                <cfif (authorizedRoles is "*") >
                        <cfreturn>
                </cfif>
                <!--- Is the current user in an authorized role?  --->
                <cfif not
beans.loginSessionManager.isInAnyRole(authorizedRoles) >
                        <cfset arguments.event.addResult("NotAuthorized") />
                </cfif>
     </cffunction>

-- 
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en

Reply via email to