Re: Another question about cfloginuser attribute roles.

2003-08-05 Thread Sean A Corfield
On Monday, Aug 4, 2003, at 21:49 US/Pacific, Raymond Camden wrote:
 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:

An alternative is to have a pseudo-role, e.g., member_or_guest and then 
in your cfloginuser tag, you don't just set members or guest , you 
set members,member_or_guest or guest,member_or_guest...

Sean A Corfield -- http://www.corfield.org/blog/

If you're not annoying somebody, you're not really alive.
-- Margaret Atwood

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=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



Another question about cfloginuser attribute roles.

2003-08-04 Thread Stéphane_Bisson
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=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

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



RE: Another question about cfloginuser attribute roles.

2003-08-04 Thread Raymond Camden
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=subscribeforumid=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