You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f5daa5d
Browse filesBrowse the repository at this point in the historyBrowse files
UN-4481 [FEAT] Show each organization's home region in the organization list (#2370)
* UN-4481 [FEAT] Show the home region for organizations copied from another region
When the identity provider metadata names the region an organization was
created in, the organization list shows that region. For a local copy of
an organization from another region it leaves out member_count, which on
this deployment covers only the people who opened the copy. Organizations
without the stamp keep the current behaviour until they are back-filled.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* UN-4481 [FEAT] Read the region stamp only where the deployment has regions
Review fixes: OSS and on-prem ignore a region key in the provider metadata,
so the contract that they never send region holds; a stamp that is not a
non-empty string counts as no stamp. Tests for both, and a corrected test
comment.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* UN-4481 [FIX] Compare region stamps without case or padding
Trim and uppercase the metadata stamp and settings.REGION before comparing,
so "us" or " US " on the home deployment no longer hides the member count.
Log a stamp that is present but not a non-empty string. Pin a mixed list,
a this-region organization with no data here, and non-dict metadata.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* UN-4481 [DOCS] Say what the list does for organizations without a stamp
The schema, ReadMe and module docstring said member_count is absent for an
organization that belongs to another region. The code can tell only from the
metadata stamp, and ignores it where REGION is unset. Say that, and that an
unstamped copy of another region's organization sends the copy's count.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: backend/account_v2/ReadMe.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,8 +53,8 @@
53
53
| Field | Present when | Value |
54
54
|---|---|---|
55
55
|`role`| The caller has a membership in the organization on this deployment. | The stored role: `admin` or `user` in OSS; `unstract_admin`, `unstract_user`, `unstract_supervisor` or `unstract_reviewer` in cloud. |
56
-
|`member_count`| The organization exists on this deployment. | The people the members page lists: the organization's member records on this deployment. Platform API key accounts and pending invitations are not counted. |
57
-
|`region`| The organization exists on this deployment and the deployment sets `REGION`. | The region code (`US`, `EU`; `STAGING`, `DEV` or `INTEGRATION` outside production). The client maps it to a label. OSS and on-prem never send it: their settings don't read `REGION`, whatever the environment sets. It is the region of the deployment that answered: an organization from another region that the user once opened here has a local copy, so it shows this region and this deployment's member count. |
56
+
|`member_count`| The organization exists on this deployment and, where the deployment sets `REGION`, its metadata doesn't name a different region. An organization created before the stamp and not back-filled carries no region, so a local copy of one from another region still sends the copy's count. | The people the members page lists: the organization's member records on this deployment. Platform API key accounts and pending invitations are not counted. |
57
+
|`region`| The deployment sets `REGION`, and either the organization's metadata names a region or the organization exists on this deployment. | The region code (`US`, `EU`; `STAGING`, `DEV` or `INTEGRATION` outside production), from the metadata trimmed and uppercased, else this deployment's `REGION`. The client maps it to a label. OSS and on-prem never send it: their settings don't read `REGION`, whatever the environment sets. Cloud stamps `region` on an organization's metadata where it is created. An organization from another region that the user once opened here has a local copy; its row shows the home region and no `member_count`, since this deployment counts only the people who opened the copy. Organizations created before the stamp and not back-filled show the region of the deployment that answered. |
58
58
59
59
If working out these three fields fails, the list is returned without them and the failure is logged.
0 commit comments