mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 00:47:04 +02:00
Co-authored-by: lab-assistant[bot] <180935599+lab-assistant[bot]@users.noreply.github.com>
12 lines
285 B
Smarty
12 lines
285 B
Smarty
{{/*
|
|
Validate Role values
|
|
*/}}
|
|
{{- define "bjw-s.common.lib.rbac.role.validate" -}}
|
|
{{- $rootContext := .rootContext -}}
|
|
{{- $roleValues := .object -}}
|
|
{{- $rules := $roleValues.rules -}}
|
|
|
|
{{- if not $rules -}}
|
|
{{- fail "Rules can't be empty" -}}
|
|
{{- end -}}
|
|
{{- end -}}
|