Repository.Project.GetUserAccessibleProjects: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
(Created page with '{{Template:API}}{{Template:APIBreadcrumb|.Repository}} <onlyinclude>Returns an array of '''NameIDPair''' objects containing all projec…')
 
No edit summary
 
Line 2: Line 2:




<onlyinclude>Returns an array of '''[[NameIdPair Class|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.</onlyinclude>
<onlyinclude>Returns an array of '''[[NameIdPair Class|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 to obtain the list of projects for another user. Admin permissions are not required to obtain a list of project for your own account.</onlyinclude>


== Syntax ==
== Syntax ==

Latest revision as of 15:59, 9 August 2018

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 to obtain the list of projects for another user. Admin permissions are not required to obtain a list of project for your own account.

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)