Files
coder/scripts/typegen/typescript.tstmpl
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
685 B
Plaintext
Raw Normal View History

// Code generated by typegen/main.go. DO NOT EDIT.
import type { RBACAction, RBACResource } from "./typesGenerated";
// RBACResourceActions maps RBAC resources to their possible actions.
// Descriptions are included to document the purpose of each action.
// Source is in 'coderd/rbac/policy/policy.go'.
export const RBACResourceActions: Partial<
Record<RBACResource, Partial<Record<RBACAction, string>>>
> = {
{{- range $element := . }}
{{- if eq $element.Type "*" }}{{ continue }}{{ end }}
{{ $element.Type }}: {
{{- range $actionValue, $actionDescription := $element.Actions }}
{{ $actionValue }}: "{{ $actionDescription }}",
{{- end }}
},
{{- end }}
};