datumforge / datum

Datum's central server
https://datum.net
Apache License 2.0
53 stars 7 forks source link

[Feature Request] User Default Org should be updated when first Organization is created #1076

Closed golanglemonade closed 6 days ago

golanglemonade commented 1 week ago

Describe how the feature might make your life easier or solve a problem

We create personal orgs when a user first registers and this is set as the default_org in the user settings. When a user than makes a new organization in the UI they still get put into their personal org even though this no longer appears in any dropdown selections.

To fix this, when a new organization is created, if the default_org is a personal org, the default org should be updated to the newly created org id.

The same logic should be used when accepting an org invite, if its the first non-personal org a user is added to; it should be their default org