-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for identity/GetMembers #87
Conversation
VenafiPS/Public/Get-TppIdentity.ps1
Outdated
$assocParams.UriLeaf = 'Identity/GetMembers' | ||
$assocParams.Body.Add("ResolveNested","1"); | ||
$members = Invoke-VenafiRestMethod @assocParams | ||
$response | Add-Member @{ 'Members' = $members.Identities} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should look for the response to be consistent. an identity typically consists of ID, Name and Path. $members.Identities returns quite a bit more than that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Identities returned by GetMembers is the same data returned by GetAssociatedEntries , it is an array of type "Identity Entry Object". So how is it not consistent ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not consistent with what Get-TppIdentity returns which is ID, Name, Path, and IsGroup. associated should be updated as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I can make those updates.
VenafiPS/Public/Get-TppIdentity.ps1
Outdated
if (($response.IsGroup) -and ($IncludeMembers)) { | ||
$assocParams = $params.Clone() | ||
$assocParams.UriLeaf = 'Identity/GetMembers' | ||
$assocParams.Body.Add("ResolveNested","1"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to keep consistent syntax
$assocParams.Body.Add("ResolveNested","1"); | |
$assocParams.Body.ResolveNested = '1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer the explicit syntax since it emphasizes that that is a new key, as opposed to simply updating an existing one. Coding wise I think that makes it easier to read . I can go either way though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typically it's best to follow the convention of the existing code so it's all the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work @denvenafi!
No description provided.