Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetObject Monikers LDAP for NDS and ADSI?
Message
De
22/08/2005 05:44:10
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
21/08/2005 13:30:12
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01042573
Message ID:
01042622
Vues:
19
>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) && No membership check group set
			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 && Found
					Return .T.
				Endif
			Endfor
		Endif
		Return .F. && Not a member
	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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform