Skip to content

feat: add owner groups to workspace data #12841

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

Merged
merged 19 commits into from
Apr 5, 2024
Prev Previous commit
Next Next commit
add sql behavior
  • Loading branch information
f0ssel committed Apr 4, 2024
commit 9b82463525b31e22dbb11c8672b0404c4953dd9f
4 changes: 2 additions & 2 deletions coderd/database/dbmem/dbmem.go
Original file line number Diff line number Diff line change
Expand Up @@ -2250,7 +2250,7 @@ func (q *FakeQuerier) GetGroupMembers(_ context.Context, id uuid.UUID) ([]databa
return users, nil
}

func (q *FakeQuerier) GetGroupsByOrganizationAndUserID(ctx context.Context, arg database.GetGroupsByOrganizationAndUserIDParams) ([]database.Group, error) {
func (q *FakeQuerier) GetGroupsByOrganizationAndUserID(_ context.Context, arg database.GetGroupsByOrganizationAndUserIDParams) ([]database.Group, error) {
err := validateDatabaseType(arg)
if err != nil {
return nil, err
Expand All @@ -2266,7 +2266,7 @@ func (q *FakeQuerier) GetGroupsByOrganizationAndUserID(ctx context.Context, arg
}
groups := []database.Group{}
for _, group := range q.groups {
if slices.Contains(groupIds, group.ID) {
if slices.Contains(groupIds, group.ID) && group.OrganizationID == arg.OrganizationID {
groups = append(groups, group)
}
}
Expand Down
Loading