Vault API - User List

This forum is now locked, since Gold Support is no longer offered.

Moderator: SourceGear

Locked
ISBE
Posts: 11
Joined: Thu May 20, 2004 7:50 am

Vault API - User List

Post by ISBE » Fri Oct 29, 2004 11:57 am

How do I retreive the active user list for a Vault repository? Once I retrieve this list, I will also need to know how to add and remove selected users. We are using Vault 2.0.3 and VB.Net 2002

Thanks in advance,
Brian

sterwill
Posts: 256
Joined: Thu Nov 06, 2003 10:01 am
Location: SourceGear

Post by sterwill » Fri Oct 29, 2004 1:49 pm

I wrote some example code for listing and adding users. Vault's design doesn't permit deleting users once they've been added, because of the effects that would have on the history of the objects in the repository.

You'll need to drop your DLLs from your client installation into the Client DLLs directory once you expand the zip file.
Attachments
ListUsers.zip
(7.33 KiB) Downloaded 645 times
Shaw Terwilliger
SourceGear LLC
`echo sterwill5sourcegear6com | tr 56 @.`

sterwill
Posts: 256
Joined: Thu Nov 06, 2003 10:01 am
Location: SourceGear

Post by sterwill » Fri Oct 29, 2004 1:51 pm

I didn't catch it until it was too late that you're using VB. My example is written in C#, but the code is so simple (and the Vault functions and types are all identical) that it should be very easy to translate to VB. Let me know if you want any help understanding the C#.

Also, the project file is in Visual Studio 2003 format. If you're working on your own existing app, I'd recommend simply adding project references to the Vault client DLLs, then looking at SupportClient.cs for the basics of the ClientInstance object.
Shaw Terwilliger
SourceGear LLC
`echo sterwill5sourcegear6com | tr 56 @.`

Locked