Repository.Project.GetUserAccessibleProjects

From ReliaWiki
Revision as of 00:24, 9 August 2018 by David J. Groebel (talk | contribs) (Created page with '{{Template:API}}{{Template:APIBreadcrumb|.Repository}} <onlyinclude>Returns an array of '''NameIDPair''' objects containing all projec…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
APIWiki.png


Member of: SynthesisAPI.Repository


Returns an array of NameIDPair objects containing all project names and their IDs from the current repository to which the user has access. Connected user must have Admin permissions.

Syntax

.Project.GetUserAccessibleProjects(UserLogin)

Parameters

UserLogin

Required. String. The user login (domain\user). If the input is empty then the method returns the projects for the currently connected user.

Example

VBA|VB.NET

 'Declare a new Repository object and connect to a ReliaSoft repository. 
  Dim MyRepository As New Repository
  MyRepository.ConnectToAccessRepository("C:\RSRepository1.rsr18")
  
 'Get a list of all projects in the repository for a specified user.  
  Dim ListofProjects() As NameIDPair
  Dim sUserLogin As String
  sUserLogin = "myDomain\TestUser"
  ListOfProjects = MyRepository.Project.GetUserAccessibleProjects(sUserLogin)