4848 $SecurityToken ,
4949
5050 # The Project ID.
51- # If this is provided without anything else, will get permissions for the projectID
51+ # If this is provided without anything else, will get permissions for the projectID
5252 [Parameter (Mandatory , ValueFromPipelineByPropertyName , ParameterSetName = ' Project' )]
5353 [Parameter (ValueFromPipelineByPropertyName , ParameterSetName = ' Analytics' )]
5454 [Parameter (Mandatory , ValueFromPipelineByPropertyName , ParameterSetName = ' AreaPath' )]
5858 [Parameter (Mandatory , ValueFromPipelineByPropertyName , ParameterSetName = ' BuildDefinition' )]
5959 [Parameter (Mandatory , ValueFromPipelineByPropertyName , ParameterSetName = ' BuildPermission' )]
6060 [Parameter (Mandatory , ValueFromPipelineByPropertyName , ParameterSetName = ' IterationPath' )]
61- [Parameter (Mandatory , ValueFromPipelineByPropertyName , ParameterSetName = ' RepositoryID' )]
61+ [Parameter (Mandatory , ValueFromPipelineByPropertyName , ParameterSetName = ' RepositoryID' )]
6262 [Parameter (Mandatory , ValueFromPipelineByPropertyName , ParameterSetName = ' ProjectRepository' )]
63- [Parameter (Mandatory , ValueFromPipelineByPropertyName , ParameterSetName = ' ProjectOverview' )]
63+ [Parameter (Mandatory , ValueFromPipelineByPropertyName , ParameterSetName = ' ProjectOverview' )]
6464 [Alias (' Project' )]
6565 [string ]
6666 $ProjectID ,
114114 [Parameter (Mandatory , ValueFromPipelineByPropertyName , ParameterSetName = ' Plan' )]
115115 [switch ]
116116 $Plan ,
117-
117+
118118 # If set, will get dashboard permissions related to the current project.
119119 [Parameter (Mandatory , ValueFromPipelineByPropertyName , ParameterSetName = ' Dashboard' )]
120120 [Alias (' Dashboards' )]
137137 $BuildPermission ,
138138
139139 # If provided, will get build and release permissions for a given project's repositoryID
140- [Parameter (Mandatory , ValueFromPipelineByPropertyName , ParameterSetName = ' RepositoryID' )]
140+ [Parameter (Mandatory , ValueFromPipelineByPropertyName , ParameterSetName = ' RepositoryID' )]
141141 [string ]
142142 $RepositoryID ,
143143
144- # If provided, will get permissions for a given branch within a repository
144+ # If provided, will get permissions for a given branch within a repository
145145 [Parameter (ValueFromPipelineByPropertyName , ParameterSetName = ' RepositoryID' )]
146146 [Parameter (ValueFromPipelineByPropertyName , ParameterSetName = ' AllRepositories' )]
147147 [string ]
216216 if (-not $ProjectID ) { return }
217217 }
218218 $psBoundParameters [" ParameterSet" ] = ' accesscontrollists/{NamespaceId}'
219- switch - Regex ($psCmdlet.ParameterSetName ) {
219+ switch - Regex ($psCmdlet.ParameterSetName ) {
220220 Project {
221221 $null = $PSBoundParameters.Remove (' ProjectID' )
222- $q.Enqueue (@ {
222+ $q.Enqueue (@ {
223223 NamespaceID = ' 52d39943-cb85-4d7f-8fa8-c6baac873819'
224224 SecurityToken = " `$ PROJECT:vstfs:///Classification/TeamProject/$ProjectID "
225225 } + $PSBoundParameters )
232232 } else {
233233 Get-ADOIterationPath - Organization $Organization - Project $ProjectID - IterationPath $iterationPath
234234 }
235-
235+
236236 if (-not $gotPath ) {
237237 continue
238238 }
247247 )
248248
249249 [Array ]::Reverse($PathIdList )
250-
250+
251251 $null = $PSBoundParameters.Remove (' ProjectID' )
252-
253- $q.Enqueue (@ {
254- NamespaceID =
255- if ($psCmdlet.ParameterSetName -eq ' AreaPath' ) {
252+
253+ $q.Enqueue (@ {
254+ NamespaceID =
255+ if ($psCmdlet.ParameterSetName -eq ' AreaPath' ) {
256256 ' 83e28ad4-2d72-4ceb-97b0-c7726d5502c3'
257257 } else {
258- ' bf7bfa03-b2b7-47db-8113-fa2e002cc5b1'
258+ ' bf7bfa03-b2b7-47db-8113-fa2e002cc5b1'
259259 }
260260 SecurityToken = @ (foreach ($PathId in $PathIdList ) {
261261 " vstfs:///Classification/Node/$PathId "
264264 }
265265 Analytics {
266266 $null = $PSBoundParameters.Remove (' ProjectID' )
267- $q.Enqueue (@ {
268- NamespaceID = if ($ProjectID ) { ' 58450c49-b02d-465a-ab12-59ae512d6531' } else { ' d34d3680-dfe5-4cc6-a949-7d9c68f73cba' }
267+ $q.Enqueue (@ {
268+ NamespaceID = if ($ProjectID ) { ' 58450c49-b02d-465a-ab12-59ae512d6531' } else { ' d34d3680-dfe5-4cc6-a949-7d9c68f73cba' }
269269 SecurityToken = " `$ /$ ( if ($ProjectID ) { $ProjectID } else { ' Shared' }) "
270270 } + $PSBoundParameters )
271271 }
272272 Dashboard {
273273 $null = $PSBoundParameters.Remove (' ProjectID' )
274- $q.Enqueue (@ {
274+ $q.Enqueue (@ {
275275 NamespaceID = ' 8adf73b7-389a-4276-b638-fe1653f7efc7'
276276 SecurityToken = " $/$ ( if ($ProjectID ) { $ProjectID }) /$ ( if ($teamID ) { $teamid } else { [guid ]::Empty } ) "
277277 } + $PSBoundParameters )
278278 }
279279 ProjectOverview {
280280 $null = $psboundParameters.Remove (' Recurse' )
281- $q.Enqueue (@ {
281+ $q.Enqueue (@ {
282282 NamespaceID = ' 52d39943-cb85-4d7f-8fa8-c6baac873819' # Project permissions
283283 SecurityToken = " `$ PROJECT:vstfs:///Classification/TeamProject/$ProjectID "
284284 } + $PSBoundParameters )
285- $q.Enqueue (@ {
285+ $q.Enqueue (@ {
286286 NamespaceID = ' 2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87' # Repositories
287287 SecurityToken = " reposV2/$projectId "
288288 Recurse = $true
289289 } + $PSBoundParameters )
290- $q.Enqueue (@ {
290+ $q.Enqueue (@ {
291291 NamespaceID = ' 33344d9c-fc72-4d6f-aba5-fa317101a7e9' # Build definitions
292292 SecurityToken = " $ProjectID /"
293293 Recurse = $true
294294 } + $PSBoundParameters )
295- $q.Enqueue (@ {
295+ $q.Enqueue (@ {
296296 NamespaceID = ' c788c23e-1b46-4162-8f5e-d7585343b5de' # Releases
297297 SecurityToken = " $ProjectID /"
298298 Recurse = $true
299299 } + $PSBoundParameters )
300- $q.Enqueue (@ {
300+ $q.Enqueue (@ {
301301 NamespaceID = ' 8adf73b7-389a-4276-b638-fe1653f7efc7' # Dashboards
302302 SecurityToken = " `$ /$ProjectID /"
303303 Recurse = $true
304304 } + $PSBoundParameters )
305- $q.Enqueue (@ {
305+ $q.Enqueue (@ {
306306 NamespaceID = ' 49b48001-ca20-4adc-8111-5b60c903a50c' # Service Endpoints
307307 SecurityToken = " endpoints/$ProjectID "
308308 Recurse = $true
309309 } + $PSBoundParameters )
310- $q.Enqueue (@ {
310+ $q.Enqueue (@ {
311311 NamespaceID = ' cb594ebe-87dd-4fc9-ac2c-6a10a4c92046' # Service Hooks
312312 SecurityToken = " PublisherSecurity/$ProjectID "
313313 Recurse = $true
314314 } + $PSBoundParameters )
315315 }
316316 Plan {
317- $q.Enqueue (@ {
317+ $q.Enqueue (@ {
318318 NamespaceID = ' bed337f8-e5f3-4fb9-80da-81e17d06e7a8'
319319 SecurityToken = " Plan"
320320 } + $PSBoundParameters )
321321 }
322322 Tagging {
323323
324- $q.Enqueue (@ {
324+ $q.Enqueue (@ {
325325 NamespaceID = ' bb50f182-8e5e-40b8-bc21-e8752a1e7ae2'
326326 SecurityToken = " /$ProjectID "
327327 } + $PSBoundParameters )
328328 }
329329 ManageTFVC {
330330
331- $q.Enqueue (@ {
331+ $q.Enqueue (@ {
332332 NamespaceID = ' a39371cf-0841-4c16-bbd3-276e341bc052'
333333 SecurityToken = " /$ProjectID "
334334 } + $PSBoundParameters )
335335 }
336336 ' BuildDefinition|BuildPermission' {
337337
338- $q.Enqueue (@ {
338+ $q.Enqueue (@ {
339339 NamespaceID = ' a39371cf-0841-4c16-bbd3-276e341bc052'
340340 SecurityToken = " $ProjectID $ ( ($buildpath -replace ' \\' , ' /' ).TrimEnd(' /' )) /$DefinitionID "
341341 } + $PSBoundParameters )
342- $q.Enqueue (@ {
342+ $q.Enqueue (@ {
343343 NamespaceID = ' c788c23e-1b46-4162-8f5e-d7585343b5de'
344344 SecurityToken = " $ProjectID $ ( ($buildpath -replace ' \\' , ' /' ).TrimEnd(' /' )) /$DefinitionID "
345345 } + $PSBoundParameters )
346346 }
347347 ' RepositoryID|AllRepositories|ProjectRepository' {
348348
349- $q.Enqueue (@ {
349+ $q.Enqueue (@ {
350350 NamespaceID = ' 2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87'
351351 SecurityToken = " repo$ (
352352if ($psCmdlet.ParameterSetName -eq ' AllRepositories' ) {' s' }) V2$ (
@@ -368,23 +368,6 @@ if ($BranchName) {
368368 end {
369369 $c , $t , $progId = 0 , $q.Count , [Random ]::new().Next()
370370
371- if ($ExpandACL ) {
372-
373- $resolveIdentity = {
374- param ([Parameter (Mandatory , ValueFromPipelineByPropertyName )][string ]$Descriptor )
375- begin {
376- if (-not $script :ResolvedIdentities ) { $script :ResolvedIdentities = @ {} }
377- }
378- process {
379- if (-not $script :ResolvedIdentities [$Descriptor ]) {
380- $script :ResolvedIdentities [$Descriptor ] =
381- Invoke-ADORestAPI " https://vssps.dev.azure.com/$Organization /_apis/identities?api-version=6.0&descriptors=$Descriptor &queryMembership=Direct"
382- }
383- return $script :ResolvedIdentities [$Descriptor ]
384- }
385- }
386- }
387-
388371 if ($Overview -and $inputObject ) {
389372 $projectRepositories = $inputObject | Get-ADORepository
390373 $projectServiceEndpoints = $inputObject | Get-ADOServiceEndpoint
0 commit comments