Skip to content

refactor: use task data model for notifications - #20590

Merged
mafredri merged 2 commits into
mainfrom
mafredri/refactor-use-task-data-model-for-notifications
Oct 31, 2025
Merged

mafredri merged 2 commits into
mainfrom
mafredri/refactor-use-task-data-model-for-notifications

Conversation

@mafredri

Copy link
Copy Markdown
Member

Comment thread coderd/workspaceagents.go Resolved
@mafredri
mafredri marked this pull request as ready for review October 30, 2025 16:55
@mafredri
mafredri requested a review from Emyrk as a code owner October 30, 2025 16:55
@mafredri
mafredri force-pushed the mafredri/refactor-use-task-data-model-for-notifications branch from d379e17 to 841cb33 Compare October 30, 2025 16:57
Comment thread coderd/workspaceagents.go Resolved
Comment thread coderd/workspaceagents.go Resolved
Comment thread coderd/rbac/scopes.go
Comment on lines -55 to +70
AllowIDList: []AllowListElement{
AllowIDList: append([]AllowListElement{
{Type: ResourceWorkspace.Type, ID: params.WorkspaceID.String()},
{Type: ResourceTemplate.Type, ID: params.TemplateID.String()},
{Type: ResourceTemplate.Type, ID: params.VersionID.String()},
{Type: ResourceUser.Type, ID: params.OwnerID.String()},
},
}, extraAllowList...),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nice and narrow 👍

Just for future info, you can also do this: {Type: ResourceTask.Type, ID: policy.WildcardSymbol},

To give it access to all tasks. I assume each workspace just has 1 task though. And being narrow is better 👍

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, tasks and workspaces are 1:1 currently. Good to know about the wildcard though, thanks. 👍🏻

@mafredri
mafredri requested a review from johnstcn October 31, 2025 10:59
@mafredri
mafredri merged commit 7ae3fdc into main Oct 31, 2025
@mafredri
mafredri deleted the mafredri/refactor-use-task-data-model-for-notifications branch October 31, 2025 13:53
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants