Skip to content

Commit

Permalink
Fix User Updates (#183)
Browse files Browse the repository at this point in the history
Handle non-API data preservation across updates.  It would *really* be
something if this could be automated...
  • Loading branch information
spjmurray authored Feb 14, 2025
1 parent d7b536c commit 3f567dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/identity/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ description: A Helm chart for deploying Unikorn's IdP

type: application

version: v0.2.55
appVersion: v0.2.55
version: v0.2.56-rc1
appVersion: v0.2.56-rc1

icon: https://raw.githubusercontent.com/unikorn-cloud/assets/main/images/logos/dark-on-light/icon.png

Expand Down
3 changes: 3 additions & 0 deletions pkg/handler/users/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,9 @@ func (c *Client) Update(ctx context.Context, organizationID, userID string, requ
return nil, errors.OAuth2ServerError("failed to merge metadata").WithError(err)
}

required.Spec.LastActive = current.Spec.LastActive
required.Spec.Signup = current.Spec.Signup

updated := current.DeepCopy()
updated.Labels = required.Labels
updated.Annotations = required.Annotations
Expand Down

0 comments on commit 3f567dd

Please sign in to comment.