When you pass 2-N roles to access, or to isUserInRoles(), CF treats it
as an "AND" list - i.e., the user must be in ALL roles. To get around
this, you don't use access=, instead you write your own code:

<cfif isUserInRole("first") or isUserInRole("second")>

FYI, I wrote a UDF that will allow you to do:

<cfif isUserInAnyRole(....)>

I'm not 100% sure of the name and I'm too lazy, but it's up at
cflib.org.

========================================================================
===
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: Stéphane_Bisson [mailto:[EMAIL PROTECTED] 
> Sent: Monday, August 04, 2003 10:38 PM
> To: CF-Talk
> Subject: Another question about cfloginuser attribute "roles". 
> 
> 
> New question about cfloginuser attribute "roles". I try 
> something tonight and it seems that I cannot make it to work. 
> So I will explain... 
> 
> I have a user "members" role and I have a user "guest" role. 
> They both login with their role... I want them both to be 
> able to call my CFC methods which is... 
> 
>  <cffunction name="GetSlides" access="remote" 
> returnType="query" roles="member_role,guest_role"> 
> 
> It does not seems to work and I did not put any space between 
> them!.... I just hope that two different users like member 
> and guest can be able to 
> execute my methods with their own role! I'm always getting 
> the error that is not authorized... It's only the first CFC 
> role that is valid... So in this case the member can get the 
> GetSlides... but the guest is unauthorized... I'm missing something!
> 
> Thanks 
> 
> Stephane
> 
> 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

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

Reply via email to