This documentation is archived and is not being maintained.

VersionControlServer.GetEffectivePermissions Method

Does the user have permissions set to check in that particular file? When you answer this question in Team Foundation Server, it can involve some or all the following additional questions: What rights (both allow and deny) does this user have to this file? Does this file inherit rights from its parent folder? If so, what rights does this user have to that parent folder? (and continuing up the tree) What groups does this user belong to, and what rights do they have? This method takes into account all of these answers to return a set of actual rights that the specified user has to the specified file or folder.

Namespace:  Microsoft.TeamFoundation.VersionControl.Client
Assembly:  Microsoft.TeamFoundation.VersionControl.Client (in Microsoft.TeamFoundation.VersionControl.Client.dll)

public string[] GetEffectivePermissions(
	string userName,
	string item
)

Parameters

userName
Type: System.String

Name of user for which you want to check permissions.

item
Type: System.String

The file or folder for which you want to search. This may be a Team Foundation Server path ($/CmdLine/parse.cs) or a local path (C:\Code\CmdLine\parse.cs), in the latter case, the local path is mapped to a server path via a workspace.

Return Value

Type: System.String[]
Returns an array of permission names that are displayed in a string for the user.

Applies the allow and deny lists, inheritance, and group membership rules to create a simple list of permissions for the user.

Show: