outposts/proxy: fix panic due to IsSet misbehaving

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer 2023-01-19 18:22:55 +01:00
parent 64af78110a
commit 43854dc828
No known key found for this signature in database
1 changed files with 2 additions and 3 deletions

View File

@ -77,9 +77,8 @@ func NewApplication(p api.ProxyOutpostConfig, c *http.Client, cs *ak.CryptoStore
}.Encode() }.Encode()
managed := false managed := false
if ak.Outpost.Managed.IsSet() { if m := ak.Outpost.Managed.Get(); m != nil {
m := *ak.Outpost.Managed.Get() managed = *m == "goauthentik.io/outposts/embedded"
managed = m == "goauthentik.io/outposts/embedded"
} }
// Configure an OpenID Connect aware OAuth2 client. // Configure an OpenID Connect aware OAuth2 client.
endpoint := GetOIDCEndpoint( endpoint := GetOIDCEndpoint(