>I'm in a mixed network situation that is predominantly Novell and we are adding Windows ADSI. I'm not too sure about all the details of combining the two, but I am won't be surprised if it is not implemented correctly. And I'll be surprised if it get rolled out to all the users (some 90). Our fileservers are Novell. Be grateful if you are a Windows-only environment, IMO.
>What I'd like to do in VFP is to detect that a user is a member of a group whether that group is designated in Novell or ADSI.
>
>The getobject('moniker') is very useful and works.
>
>One would think that getting whether a user is a member of a group should be fairly easy without doing something like attempting to write to a folder or something crude like that.
>
>Any tips?
This is from my LDAP routines class:
Procedure CheckMemberShip(toRs,tcMemberOf)
If Empty(m.tcMemberOf)
Return .T.
Endif
tcMemberOf = Alltrim(Upper(m.tcMemberOf))
Local ix
Local Array aMemberOf[1]
aMemberOf = toRs.Fields('MemberOf').Value
If !Isnull(aMemberOf)
For ix=1 To Alen(aMemberOf)
If Alltrim(Upper(aMemberOf[m.ix])) == m.tcMemberOf
Return .T.
Endif
Endfor
Endif
Return .F.
Endproc
toRS is an ADO recordset retrieved with a call like:
strFrom = 'LDAP://'+.cServer+':'+Ltrim(Str(.nPort))+'/'+m.tcContainer
com.CommandText = [SELECT ]+m.tcFieldList+[ FROM ']+strFrom+[']+;
Iif(Empty(m.tcFilter),[],[ Where ]+m.tcFilter)
Cetin