Skip to content

Commit 6b645d6

Browse files
committed
fix permissions
1 parent fb8c284 commit 6b645d6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

coderd/database/dbauthz/dbauthz.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ var (
171171
DisplayName: "Provisioner Daemon",
172172
Site: rbac.Permissions(map[string][]policy.Action{
173173
rbac.ResourceProvisionerJobs.Type: {policy.ActionRead, policy.ActionUpdate, policy.ActionCreate},
174-
rbac.ResourceFile.Type: {policy.ActionRead},
174+
rbac.ResourceFile.Type: {policy.ActionCreate, policy.ActionRead},
175175
rbac.ResourceSystem.Type: {policy.WildcardSymbol},
176176
rbac.ResourceTemplate.Type: {policy.ActionRead, policy.ActionUpdate},
177177
// Unsure why provisionerd needs update and read personal

coderd/provisionerdserver/provisionerdserver.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1392,7 +1392,8 @@ UploadFileStream:
13921392
return xerrors.Errorf("unsupported file upload type: %s", file.Type)
13931393
}
13941394

1395-
_, err = s.Database.InsertFile(s.lifecycleCtx, insert)
1395+
//nolint:gocritic // Provisionerd actor
1396+
_, err = s.Database.InsertFile(dbauthz.AsProvisionerd(s.lifecycleCtx), insert)
13961397
if err != nil {
13971398
// Duplicated files already exist in the database, so we can ignore this error.
13981399
if !database.IsUniqueViolation(err, database.UniqueFilesHashCreatedByKey) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy