Skip to content

Commit e6970e1

Browse files
committed
Add rbac resource enums
1 parent 659800c commit e6970e1

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed

coderd/rbac/object.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ type Objecter interface {
1414
// Resources are just typed objects. Making resources this way allows directly
1515
// passing them into an Authorize function and use the chaining api.
1616
var (
17+
// ResourceWildcard represents all resource types
18+
// Try to avoid using this where possible.
19+
ResourceWildcard = Object{
20+
Type: WildcardSymbol,
21+
}
22+
1723
// ResourceWorkspace CRUD. Org + User owner
1824
// create/delete = make or delete workspaces
1925
// read = access workspace

codersdk/rbacresources.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package codersdk
2+
3+
type RBACResource string
4+
5+
const (
6+
ResourceWorkspace RBACResource = "workspace"
7+
ResourceWorkspaceProxy RBACResource = "workspace_proxy"
8+
ResourceWorkspaceExecution RBACResource = "workspace_execution"
9+
ResourceWorkspaceApplicationConnect RBACResource = "application_connect"
10+
ResourceAuditLog RBACResource = "audit_log"
11+
ResourceTemplate RBACResource = "template"
12+
ResourceGroup RBACResource = "group"
13+
ResourceFile RBACResource = "file"
14+
ResourceProvisionerDaemon RBACResource = "provisioner_daemon"
15+
ResourceOrganization RBACResource = "organization"
16+
ResourceRoleAssignment RBACResource = "assign_role"
17+
ResourceOrgRoleAssignment RBACResource = "assign_org_role"
18+
ResourceAPIKey RBACResource = "api_key"
19+
ResourceUser RBACResource = "user"
20+
ResourceUserData RBACResource = "user_data"
21+
ResourceOrganizationMember RBACResource = "organization_member"
22+
ResourceLicense RBACResource = "license"
23+
ResourceDeploymentValues RBACResource = "deployment_config"
24+
ResourceDeploymentStats RBACResource = "deployment_stats"
25+
ResourceReplicas RBACResource = "replicas"
26+
ResourceDebugInfo RBACResource = "debug_info"
27+
ResourceSystem RBACResource = "system"
28+
)

site/src/api/typesGenerated.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ export interface DeploymentValues {
379379
readonly git_auth?: any
380380
readonly config_ssh?: SSHConfig
381381
readonly wgtunnel_host?: string
382+
readonly disable_owner_workspace_exec?: boolean
382383
readonly config?: string
383384
readonly write_config?: boolean
384385
// Named type "github.com/coder/coder/cli/clibase.HostPort" unknown, using "any"

site/src/pages/DeploySettingsPage/SecuritySettingsPage/SecuritySettingsPageView.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export const SecuritySettingsPageView = ({
3636
options,
3737
"SSH Keygen Algorithm",
3838
"Secure Auth Cookie",
39+
"Disable Owner Workspace Execution"
3940
)}
4041
/>
4142
</div>

0 commit comments

Comments
 (0)