mirror of
https://github.com/passbolt/go-passbolt.git
synced 2025-05-09 09:48:20 +00:00
Update Group Helpers to use new Group Contains
This commit is contained in:
parent
d84e7e7ad7
commit
f3fe6eb1c5
1 changed files with 4 additions and 2 deletions
|
@ -49,7 +49,9 @@ func CreateGroup(ctx context.Context, c *api.Client, name string, operations []G
|
|||
func GetGroup(ctx context.Context, c *api.Client, groupID string) (string, []GroupMembership, error) {
|
||||
// for some reason the groups index api call does not give back the groups_users even though it is supposed to, so i have to do this...
|
||||
groups, err := c.GetGroups(ctx, &api.GetGroupsOptions{
|
||||
ContainGroupUser: true,
|
||||
ContainGroupsUsers: true,
|
||||
ContainGroupsUsersUser: true,
|
||||
ContainGroupsUsersUserProfile: true,
|
||||
})
|
||||
if err != nil {
|
||||
return "", nil, fmt.Errorf("Getting Groups: %w", err)
|
||||
|
@ -77,7 +79,7 @@ func GetGroup(ctx context.Context, c *api.Client, groupID string) (string, []Gro
|
|||
func UpdateGroup(ctx context.Context, c *api.Client, groupID, name string, operations []GroupMembershipOperation) error {
|
||||
// for some reason the groups index api call does not give back the groups_users even though it is supposed to, so i have to do this...
|
||||
groups, err := c.GetGroups(ctx, &api.GetGroupsOptions{
|
||||
ContainGroupUser: true,
|
||||
ContainGroupsUsers: true,
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("Getting Groups: %w", err)
|
||||
|
|
Loading…
Add table
Reference in a new issue