We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea9b9be commit fc42d65Copy full SHA for fc42d65
scripts/rbacgen/codersdk.gotmpl
@@ -16,3 +16,15 @@ const (
16
{{ $element.Enum }} RBACAction = "{{ $element.Value }}"
17
{{- end }}
18
)
19
+
20
+// RBACResourceActions is the mapping of resources to which actions are valid for
21
+// said resource type.
22
+var RBACResourceActions = map[RBACResource][]RBACAction{
23
+ {{- range $element := . }}
24
+ Resource{{ pascalCaseName $element.FunctionName }}: []RBACAction{
25
+ {{- range $actionValue, $_ := $element.Actions }}
26
+ {{- actionEnum $actionValue -}},
27
+ {{- end -}}
28
+ },
29
+ {{- end }}
30
+}
0 commit comments