feat(coderd): add tasks rbac object (#20234)

This change adds RBAC for tasks.

Updates coder/internal#948
Supersedes coder/coder#20212
This commit is contained in:
Mathias Fredriksson
2025-10-13 12:02:22 +03:00
committed by GitHub
parent d9f95f2285
commit 299a54a99b
19 changed files with 155 additions and 3 deletions
+6
View File
@@ -156,6 +156,12 @@ export const RBACResourceActions: Partial<
read: "view info about a Tailnet coordinator",
update: "update a Tailnet coordinator",
},
task: {
create: "create a new task",
delete: "delete task",
read: "read task data or output to view on the UI or CLI",
update: "edit task settings or send input to an existing task",
},
template: {
create: "create a template",
delete: "delete a template",
+12
View File
@@ -247,6 +247,11 @@ export type APIKeyScope =
| "tailnet_coordinator:delete"
| "tailnet_coordinator:read"
| "tailnet_coordinator:update"
| "task:*"
| "task:create"
| "task:delete"
| "task:read"
| "task:update"
| "template:*"
| "template:create"
| "template:delete"
@@ -438,6 +443,11 @@ export const APIKeyScopes: APIKeyScope[] = [
"tailnet_coordinator:delete",
"tailnet_coordinator:read",
"tailnet_coordinator:update",
"task:*",
"task:create",
"task:delete",
"task:read",
"task:update",
"template:*",
"template:create",
"template:delete",
@@ -2915,6 +2925,7 @@ export type RBACResource =
| "replicas"
| "system"
| "tailnet_coordinator"
| "task"
| "template"
| "usage_event"
| "user"
@@ -2958,6 +2969,7 @@ export const RBACResources: RBACResource[] = [
"replicas",
"system",
"tailnet_coordinator",
"task",
"template",
"usage_event",
"user",