MethodsAndPractices / vsteam

PowerShell module for accessing Azure DevOps Services and Azure DevOps Server (formerly VSTS or TFS)
https://methodsandpractices.github.io/vsteam-docs/
MIT License
442 stars 155 forks source link

Add-VSTeamAccessControlEntry allows results in a (400) bad request #538

Open esijnja opened 11 months ago

esijnja commented 11 months ago

Steps to reproduce

Add-VSTeamAccessControlEntry -SecurityNamespaceId $namespaceId -Token $token -Descriptor $descriptor -AllowMask $allowBits -DenyMask $denyBits 

Expected behavior

I expected that the permission is set for the subject (descriptor) with the bits maps passed.

Actual behavior?

I had the following actual outcome the call result in a (400) bad request. The problem is that the $merge is put in the $body , this results in True or False iso true or false.

There is a unit test, but the unit test uses a -like which tests case insensitive that is why the unit test passes.

On Which OS have you tried it?

Windows

What was your server version?

Azure DevOps Services

Other server version

7.13.1

Log output of used API

Billing                     : 
Build                       : 3.0
Core                        : 3.0
DistributedTask             : 3.0-preview
DistributedTaskReleased     : 
ExtensionsManagement        : 3.0-preview
Git                         : 3.0
Graph                       : 
HierarchyQuery              : 
MemberEntitlementManagement : 
Packaging                   : 3.0-preview
Pipelines                   : 
Policy                      : 3.0
Processes                   : 
Release                     : 3.0-preview
ServiceEndpoints            : 3.0-preview
TaskGroups                  : 3.0-preview
Tfvc                        : 3.0
VariableGroups              : 
Version                     : TFS2017
Wiki                        : 
WorkItemTracking            : 3.0

Log output of $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.3.6
PSEdition                      Core
GitCommitId                    7.3.6
OS                             Microsoft Windows 10.0.17763
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
SebastianSchuetze commented 11 months ago

Thanks for catching this. 🙏 I will review the PR and run the build.