- Notifications
You must be signed in to change notification settings - Fork906
feat: add prebuilt workspaces to non-default organizations#18010
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
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
b886b03
920436b
0fcac58
a7cf396
1fd483b
05c28d1
1280b6a
c20f6e3
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -412,6 +412,21 @@ var ( | ||
policy.ActionCreate, policy.ActionDelete, policy.ActionRead, policy.ActionUpdate, | ||
policy.ActionWorkspaceStart, policy.ActionWorkspaceStop, | ||
}, | ||
// Should be able to add the prebuilds system user as a member to any organization that needs prebuilds. | ||
rbac.ResourceOrganizationMember.Type: { | ||
policy.ActionCreate, | ||
}, | ||
Comment on lines +416 to +418 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I think you also need read here to | ||
// Needs to be able to assign roles to the system user in order to make it a member of an organization. | ||
rbac.ResourceAssignOrgRole.Type: { | ||
policy.ActionAssign, | ||
}, | ||
// Needs to be able to read users to determine which organizations the prebuild system user is a member of. | ||
rbac.ResourceUser.Type: { | ||
policy.ActionRead, | ||
}, | ||
rbac.ResourceOrganization.Type: { | ||
policy.ActionRead, | ||
}, | ||
}), | ||
}, | ||
}), | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -33,6 +33,8 @@ const ( | ||
orgUserAdmin string = "organization-user-admin" | ||
orgTemplateAdmin string = "organization-template-admin" | ||
orgWorkspaceCreationBan string = "organization-workspace-creation-ban" | ||
prebuildsOrchestrator string = "prebuilds-orchestrator" | ||
) | ||
func init() { | ||
@@ -599,6 +601,9 @@ var assignRoles = map[string]map[string]bool{ | ||
orgUserAdmin: { | ||
orgMember: true, | ||
}, | ||
prebuildsOrchestrator: { | ||
SasSwart marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
orgMember: true, | ||
}, | ||
} | ||
// ExpandableRoles is any type that can be expanded into a []Role. This is implemented | ||
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.