@@ -18,7 +18,6 @@ import (
18
18
19
19
"cdr.dev/slog"
20
20
21
- "github.com/coder/coder/v2/coderd/prebuilds"
22
21
"github.com/coder/coder/v2/coderd/rbac/policy"
23
22
"github.com/coder/coder/v2/coderd/rbac/rolestore"
24
23
@@ -359,27 +358,6 @@ var (
359
358
}),
360
359
Scope : rbac .ScopeAll ,
361
360
}.WithCachedASTValue ()
362
-
363
- subjectPrebuildsOrchestrator = rbac.Subject {
364
- FriendlyName : "Prebuilds Orchestrator" ,
365
- ID : prebuilds .OwnerID .String (),
366
- Roles : rbac .Roles ([]rbac.Role {
367
- {
368
- Identifier : rbac.RoleIdentifier {Name : "prebuilds-orchestrator" },
369
- DisplayName : "Coder" ,
370
- Site : rbac .Permissions (map [string ][]policy.Action {
371
- // May use template, read template-related info, & insert template-related resources (preset prebuilds).
372
- rbac .ResourceTemplate .Type : {policy .ActionRead , policy .ActionUpdate , policy .ActionUse },
373
- // May CRUD workspaces, and start/stop them.
374
- rbac .ResourceWorkspace .Type : {
375
- policy .ActionCreate , policy .ActionDelete , policy .ActionRead , policy .ActionUpdate ,
376
- policy .ActionWorkspaceStart , policy .ActionWorkspaceStop ,
377
- },
378
- }),
379
- },
380
- }),
381
- Scope : rbac .ScopeAll ,
382
- }.WithCachedASTValue ()
383
361
)
384
362
385
363
// AsProvisionerd returns a context with an actor that has permissions required
@@ -434,12 +412,6 @@ func AsSystemReadProvisionerDaemons(ctx context.Context) context.Context {
434
412
return context .WithValue (ctx , authContextKey {}, subjectSystemReadProvisionerDaemons )
435
413
}
436
414
437
- // AsPrebuildsOrchestrator returns a context with an actor that has permissions
438
- // to read orchestrator workspace prebuilds.
439
- func AsPrebuildsOrchestrator (ctx context.Context ) context.Context {
440
- return context .WithValue (ctx , authContextKey {}, subjectPrebuildsOrchestrator )
441
- }
442
-
443
415
var AsRemoveActor = rbac.Subject {
444
416
ID : "remove-actor" ,
445
417
}
0 commit comments