Blair,
here a test.
<cfset aUsergrps =
application.security.userdirectories.LDAPUD.getUserGroups('myuser')>
<cfset lUsergrps = "">
<cfloop from="1" to="#ArrayLen(aUsergrps)#" index="i">
<cfset lUsergrps = ListAppend(lUsergrps,aUsergrps[i] & "_LDAPUD")>
</cfloop>
<cfset grp2roles =
application.security.factory.role.groupsToRoles(lUsergrps)>
<cfdump var="#aUsergrps#">
***** returns an array with my user's groups - - working...
<cfdump var="#grp2roles#">
**** Empty string
As mentioned above, I do see my AD groups listed in Roles Admin. And I
have confirmed that some of the groups output in my test code
lUsergrps, exist in the farRole_aGroups table even tho
application.security.factory.role.groupsToRoles(lUsergrps) is returing
an empty string.
---- update ---
I changed the test code to "trim" my group names and I get a UUID
returned by application.security.factory.role.groupsToRoles(lUsergrps)
<cfloop from="1" to="#ArrayLen(aUsergrps)#" index="i">
<cfset tmp = trim(aUsergrps[i])>
<cfset lUsergrps = ListAppend(lUsergrps,tmp & "_LDAPUD")>
</cfloop>
Perhaps the my problem is a leading/trailing whitespace issue?
Where is the _UDKEY get appeneded? As you can see I had to stick it
on..
Thanks a ton. Once I get this solved I'll look at your login form
recommendations.
On Aug 4, 5:09 pm, "Blair McKenzie" <
shi...@gmail.com> wrote:
> I can't troubleshoot this myself, so I'll walk you through the chain of
> authentication functions. Hopefully we can find where the groups are getting
> lost.
>
> *
> application.security.userdirectorys[yourudkey].getUserGroups(test_user_name)
> *
> FarCry should be able to handle user groups as long as the user directory
> getUserGroups function is returning them correctly. Have you been able to
> confirm if this is the case? You can call this function directly with
> application.security.getUserGroups(test_user_name) from a test page. The
> return value should be an array.
>
> *application.security.factory.role.groupsToRoles(groups)*