So you want to see if X is one of the user's roles? Then isUserInRole(X)
should work just fine. What happens if you change

<cfif isUserInRole("#qFoo.at_id#")>

to

<cfif isUserInRole(qFoo.at_id)>

Also, what do you see if you output the value of qFoo.at_id? Are you
100% sure it's one valid role?

========================================================================
===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email    : [EMAIL PROTECTED]
Blog     : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -----Original Message-----
> From: Jeff Lucido [mailto:[EMAIL PROTECTED] 
> Sent: Monday, August 11, 2003 3:15 PM
> To: CF-Talk
> Subject: RE: CFLOGIN and isUserInRole issues
> 
> 
> Raymond:
> 
> Thanks for the insight, however I want to check on a singular 
> level. For instance, as I am looping through the record set I 
> want to make sure that the record does not display unless the 
> user's role (a list) contains the corresponding value. So, it 
> is a singular comparison (that probably doesn't make sense). 
> 
> The weird part is I replace the recordset value with a number 
> I know is the database and it displays the value:
> 
> <cfif isUserInRole("3")>
>   Display value here.
> </cfif>
> 
> Any other ideas?
> 
> Thanks!
> -JSLucido
> 
> -----Original Message-----
> From: Raymond Camden [mailto:[EMAIL PROTECTED] 
> Sent: Monday, August 11, 2003 2:44 PM
> To: CF-Talk
> Subject: RE: CFLOGIN and isUserInRole issues
> 
> 
> If you pass N roles to isUserInRole, it is treated as an AND 
> list, ie, if you pass 2,4, it means the user must be in 2 and 
> in 4. To get around this, simply code your own UDF, or borrow 
> the one I wrote up at cflib.org. I _believe_ it is called 
> IsUserInAnyRole.
> 
> ==============================================================
> ==========
> ===
> Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
> (www.mindseye.com)
> Member of Team Macromedia 
> (http://www.macromedia.com/go/teammacromedia)
> 
> Email    : [EMAIL PROTECTED]
> Blog     : www.camdenfamily.com/morpheus/blog
> Yahoo IM : morpheus
> 
> "My ally is the Force, and a powerful ally it is." - Yoda 
> 
> > -----Original Message-----
> > From: Jeff Lucido [mailto:[EMAIL PROTECTED]
> > Sent: Monday, August 11, 2003 1:13 PM
> > To: CF-Talk
> > Subject: CFLOGIN and isUserInRole issues
> > 
> > 
> > I am pretty sure I have the world's easiest problem, 
> however I having 
> > fits using the function "isUserInRole." Specifically, when I 
> > authenticate a user I pull all of their group ID privileges 
> and turn 
> > them into a list. I assign this list to the roles attribute of 
> > cfloginuser. Now, when I specifically, know I want to keep 
> someone out 
> > of a certain section, I can easily use isUserInRole("6") to decided
> > whether or not to provide them with the privilege item.
> > 
> > Now, I have a recordset from a query of available links 
> which have a 
> > single security value, at_id. When I loop through the 
> recordset I want 
> > to display the link based on whether or not the person has 
> the proper 
> > privileges. For example:
> > 
> > User
> > Roles = 1,2,3
> > 
> > Recordset (qFoo)
> > At_id = 2,4
> > 
> > <cfloop query="qFoo">
> >   <cfif isUserInRole("#qFoo.at_id#")>
> >     -- When recordset containing at_id = 2 is processed, 
> display this 
> > string --
> >   </cfif>
> > </cfloop>
> > 
> > I hope I made some sense. I tried an index loop and that 
> did not work 
> > either (or at least my implementation). Any suggestions? I 
> really like 
> > the functions associated with the CFLOGIN tag so rolling my 
> own is not 
> > an option at this point (unless I really have to).
> > 
> > Any and all help is greatly appreciated!!
> > -JSLucido
> > 
> > 
> > 
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to