fix npe when running in limited config in generic-control-plane mode

This commit is contained in:
Mangirdas Judeikis 2024-09-22 15:59:20 +03:00
parent 61dbc03563
commit 4783af9a49

View File

@ -85,6 +85,10 @@ func NewBuiltInAuthorizationOptions() *BuiltInAuthorizationOptions {
// Complete modifies authorization options
func (o *BuiltInAuthorizationOptions) Complete() []error {
if o == nil {
return nil
}
if len(o.AuthorizationConfigurationFile) == 0 && len(o.Modes) == 0 {
o.Modes = []string{authzmodes.ModeAlwaysAllow}
}