Skip to content

Commit 672b2e0

Browse files
committed
fix GetLatestWorkspaceBuildsByWorkspaceIDs
1 parent e6d5c2f commit 672b2e0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

coderd/authzquery/workspace.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ func (q *AuthzQuerier) GetLatestWorkspaceBuildsByWorkspaceIDs(ctx context.Contex
4444
// This should probably be handled differently? Maybe join workspace builds with workspace
4545
// ownership properties and filter on that.
4646
for _, id := range ids {
47-
if err := q.authorizeContext(ctx, rbac.ActionRead, rbac.ResourceWorkspace.WithID(id)); err != nil {
47+
_, err := q.GetWorkspaceByID(ctx, id)
48+
if err != nil {
4849
return nil, err
4950
}
5051
}

0 commit comments

Comments
 (0)