Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(coderd): add tasks rbac object#20234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
mafredri wants to merge4 commits intomain
base:main
Choose a base branch
Loading
frommafredri/feat-coderd-tasks-data-model-split4

Conversation

mafredri
Copy link
Member

@mafredrimafredri commentedOct 9, 2025
edited
Loading

This change adds RBAC for tasks.

Updatescoder/internal#948
Supersedes#20212

This change adds RBAC for tasks.Updatescoder/internal#948Supersedes#20212
@mafredriGraphite App
Copy link
MemberAuthor

mafredri commentedOct 9, 2025
edited
Loading

Comment on lines +275 to +285
allPermsExcept(ResourceWorkspaceDormant,ResourcePrebuiltWorkspace,ResourceWorkspace,ResourceTask,ResourceUserSecret,ResourceUsageEvent),
// This adds back in the Workspaceand Taskpermissions.
Permissions(map[string][]policy.Action{
ResourceWorkspace.Type:ownerWorkspaceActions,
ResourceWorkspaceDormant.Type: {policy.ActionRead,policy.ActionDelete,policy.ActionCreate,policy.ActionUpdate,policy.ActionWorkspaceStop,policy.ActionCreateAgent,policy.ActionDeleteAgent},
// PrebuiltWorkspaces are a subset of Workspaces.
// Explicitly setting PrebuiltWorkspace permissions for clarity.
// Note: even without PrebuiltWorkspace permissions, access is still granted via Workspace permissions.
ResourcePrebuiltWorkspace.Type: {policy.ActionUpdate,policy.ActionDelete},
// Tasks have similar permissions to workspaces.
ResourceTask.Type: {policy.ActionRead,policy.ActionCreate,policy.ActionUpdate,policy.ActionDelete},
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm slightly confused by this, we're removing all the task permissions and then adding them all back again? Is this to protect against accidentally giving permissions to future additions toResourceTask?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I was just following suite to what's done to workspaces as tasks have similar permissions. I'm happy to remove this if it's unnecessary.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm fine with it as-is

mafredri reacted with thumbs up emoji
mafredriand others added3 commitsOctober 9, 2025 14:03
Co-authored-by: Cian Johnston <cian@coder.com>
Co-authored-by: Cian Johnston <cian@coder.com>
@mafredrimafredriforce-pushed themafredri/feat-coderd-tasks-data-model-split4 branch from69d6e7f toe9c6164CompareOctober 9, 2025 12:57
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@DanielleMaywoodDanielleMaywoodDanielleMaywood approved these changes

@johnstcnjohnstcnjohnstcn approved these changes

@EmyrkEmyrkAwaiting requested review from EmyrkEmyrk is a code owner

Assignees

@mafredrimafredri

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@mafredri@johnstcn@DanielleMaywood

[8]ページ先頭

©2009-2025 Movatter.jp