selms
asked on
Adding multiple access levels via SESSION.auth.rightsList
Have this piece of code, - which works -
<cfif not listFind(SESSION.auth.righ
<cfoutput>
"Sorry, You are not authorized to view this page.</strong>
</cfoutput>
How do I add additional access like this:
<cfif not listFind(SESSION.auth.righ
<cfoutput>
"Sorry, You are not authorized to view this page.</strong>
</cfoutput>
THANKS IN ADVANCE!!!
sorry.
<cfif ListFindNoCase(auth.rights List, i)>
should be:
<cfif ListFindNoCase(SESSION.aut h.rightsLi st, i)>
<cfif ListFindNoCase(auth.rights
should be:
<cfif ListFindNoCase(SESSION.aut
ASKER
I'm a beginner CFer...
Any way to modify my code so that If the person is NOT a SuperUser or Admin they will be denied acccess to that page???
<cfif not listFind(SESSION.auth.righ
<cfoutput>
"Sorry, You are not authorized to view this page.</strong>
</cfoutput>
ASKER
Ok, It makes more sense with the <cfif ListFindNoCase(SESSION.aut
I'll try it...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
IT WORKED!!! THANKS sooooooo much for the quick response!!!
<cfset accessList = "SuperUser,Admin,OtherAuth
<cfset inAccessList = false />
<cfloop list="#accessList#" index="i">
<cfif ListFindNoCase(auth.rights
<cfset inAccessList = true />
<cfbreak />
</cfif>
</cfloop>
<cfif not inAccessList>
<cfoutput>
"Sorry, You are not authorized to view this page.</strong>
</cfoutput>