-
Notifications
You must be signed in to change notification settings - Fork 62
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
Group.GetMember question #20
Comments
Hi @yriveiro, thanks for the question! Members and owners have a bit of extra complexity because the member object is cast as a generic DirectoryObject by the API - since it can be a user, a service principal, or another group. This is definitely something that can be improved on, if you have any ideas or preferences I'd love to hear them :) |
I'm using the I would change this to: func (c *GroupsClient) IsMemberOf(ctx context.Context, groupId, memberId string) (bool, error) {
_, status, err := c.GetMember(groupId, memberId string)
if err != nil {
false, err
}
return true
} And the equivalent for |
I can see a I'm planning to look at ways to implement a generic |
Reading the code of this line:
hamilton/clients/groups.go
Line 174 in aa2110f
If I need to pass the tuple (group_id, member_id) and the return is an ID of the member, the method shouldn't be called
IsMemberOf
?I would expect to have the full member object if I do a
GetMember
The text was updated successfully, but these errors were encountered: