Add accepted organization data to sync response (#7666)

This commit is contained in:
Tom authored and GitHub committed 2026-09-18 16:53:17 +02:00
1 parent 9c8aa2359f
commit c3f5477525
4 files changed
+48

No files matched your search

+6
View File
@@ -263,6 +263,11 @@ impl User {
orgs_json.push(c.to_json(conn).await);
}
let mut orgs_new_json = Vec::new();
for c in Membership::find_accepted_and_confirmed_by_user(&self.uuid, conn).await {
orgs_new_json.push(c.to_json(conn).await);
}
let twofactor_enabled = !TwoFactor::find_by_user(&self.uuid, conn).await.is_empty();
// TODO: Might want to save the status field in the DB
@@ -303,6 +308,7 @@ impl User {
"privateKey": self.private_key,
"securityStamp": self.security_stamp,
"organizations": orgs_json,
"organizationsNew": orgs_new_json,
"providers": [],
"providerOrganizations": [],
"forcePasswordReset": false,