Skip to content

Commit 13e938c

Browse files
committed
fixup! chore: Ensure Authorized SQL clause
1 parent bba2cdb commit 13e938c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

coderd/database/modelqueries.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,6 @@ func insertAuthorizedFilter(query string, authorizedFilter rbac.AuthorizeFilter,
203203
if !strings.Contains(query, replace) {
204204
return "", xerrors.Errorf("query does not contain authorized replace string, this is not an authorized query")
205205
}
206-
filter := strings.Replace(getWorkspaces, "-- @authorize_filter", fmt.Sprintf(" AND %s", authorizedFilter.SQLString(config)), 1)
206+
filter := strings.Replace(getWorkspaces, replace, fmt.Sprintf(" AND %s", authorizedFilter.SQLString(config)), 1)
207207
return filter, nil
208208
}

0 commit comments

Comments
 (0)