Repository.Project.GetUserPermissions

From ReliaWiki
Revision as of 00:37, 9 August 2018 by David J. Groebel (talk | contribs) (Created page with '{{Template:API}}{{Template:APIBreadcrumb|.Repository}} <onlyinclude>Returns an array of '''UserPermissionsEnum''' of all permission…')
(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 UserPermissionsEnum of all permissions the user has for the specified project. Connected user must have Admin permissions.

Syntax

.Project.GetUserPermissions(UserLogin, ProjectID)

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.

ProjectID

Required. Integer. The project ID for which permissions are to be checked.

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 permissions in the repository for a specified user for a specific project.  
  Dim ListofPermissions() As UserPermissionsEnum
  Dim sUserLogin As String
  Dim iProjectID As Integer
  sUserLogin = "myDomain\TestUser"
  iProjectID = 10
  ListofPermissions= MyRepository.Project.GetUserAccessibleProjects(sUserLogin, iProjectID)