Skip to content

Commit b0ed49c

Browse files
committed
1 parent 4f193d7 commit b0ed49c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

coderd/database/dbauthz/dbauthz.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,6 +1746,10 @@ func (q *querier) GetFileIDByTemplateVersionID(ctx context.Context, templateVers
17461746
if err != nil {
17471747
return uuid.Nil, err
17481748
}
1749+
// This is a kind of weird check, because users will almost never have this
1750+
// permission. Since this query is not currently used to provide data in a
1751+
// user facing way, it's expected that this query is run as some system
1752+
// subject in order to be authorized.
17491753
err = q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceFile.WithID(fileID))
17501754
if err != nil {
17511755
return uuid.Nil, err

0 commit comments

Comments
 (0)