Skip to content
Snippets Groups Projects
Commit 01c555f8 authored by Martin Lowe's avatar Martin Lowe :flag_ca:
Browse files

fix: address infinite recursion in EfUser serialization

The new helper method to get the public facing model of a user object
was being called during serialization, and since it returns a copy of
itself, it created a crash loop. Adding JSONIgnore forces the method to
be ignored which resolves the issue.
parent bbc13c07
No related branches found
No related tags found
No related merge requests found
......@@ -70,10 +70,12 @@ public record EfUser(String uid, String name, String picture, String mail, Eca e
}
/**
* Converts the user profile to the restricted public view.
* Converts the user profile to the restricted public view. Json Ignore is super important, as otherwise this will recursively add
* itself to json and crash.
*
* @return current user profile, with the private data blanked out.
*/
@JsonIgnore
public EfUser getPublicProfile() {
return EfUserBuilder
.builder(this)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment