From fdc7c7b5d30fd17fb1e7e1f24988e32609fd6abb Mon Sep 17 00:00:00 2001 From: Alex Snaps Date: Thu, 24 Oct 2024 18:05:48 -0400 Subject: [PATCH] I know it's halloween, but still... we should rewrite this in Ruby Signed-off-by: Alex Snaps --- pkg/evaluators/identity.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkg/evaluators/identity.go b/pkg/evaluators/identity.go index 0bce9cbf..01608d47 100644 --- a/pkg/evaluators/identity.go +++ b/pkg/evaluators/identity.go @@ -199,11 +199,13 @@ func (config *IdentityConfig) ResolveExtendedProperties(pipeline auth.AuthPipeli authJSON := pipeline.GetAuthorizationJSON() for _, extendedProperty := range config.ExtendedProperties { - resolved, err := extendedProperty.ResolveFor(extendedIdentityObject, authJSON) - if err != nil { - return nil, err + if extendedProperty.Value != nil { + resolved, err := extendedProperty.ResolveFor(extendedIdentityObject, authJSON) + if err != nil { + return nil, err + } + extendedIdentityObject[extendedProperty.Name] = resolved } - extendedIdentityObject[extendedProperty.Name] = resolved } return extendedIdentityObject, nil