# client: Use cloud as source of truth for the selected organization \(\#57140\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/5656f3eb3f431c195f721cb3cfbcb9d73f5aed0f)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 5656f3eb3f431c195f721cb3cfbcb9d73f5aed0f

Requested commit: 5656f3eb3f431c195f721cb3cfbcb9d73f5aed0f

Commit: 5656f3eb3f431c195f721cb3cfbcb9d73f5aed0f

Tree: 3a825323b3790f6f79f1cba918a4af6dd8f01a9e

Author: Tom Houlé

Committer: GitHub

## Message

```
client: Use cloud as source of truth for the selected organization (#57140)

Now that the cloud platform exposes a system-settings endpoint for the
user's selected organization, switch `UserStore` over to it and drop the
local database persistence. The server already returns the current
selected organization for `get_authenticated_user()`.

set_current_organization becomes a optimistic, with the in-memory
selection updated immediately. hen a background task POSTs to the system
settings endpoint.

Stale current_organization_id rows from older installs are left dangling
— harmless and not worth a migration. This is the second step in moving
organization selection to cloud; the first added the
update_system_settings client method.

Part of CLO-716

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
```

## Parents

- [0f6ebdd26908734c505597dac4f82546f75129f0](https://git.cafe/gitcafe/zed/commit/0f6ebdd26908734c505597dac4f82546f75129f0?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/5656f3eb3f431c195f721cb3cfbcb9d73f5aed0f?format=markdown)
