Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
szuperaz committed Apr 26, 2024
1 parent a9f50c0 commit 3f5a08d
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions docusaurus/video/docusaurus/docs/api/basics/multi-tenant.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@ When enabling multi-tenant mode all user requests will always ensure that the re

## Enable Teams for your application

In order to use Teams, your application must have multi-tenant mode enabled.

You can enable multi-tenant by API or from the dashboard (Overview screen).
In order to use Teams, your application must have multi-tenant mode enabled. You can enable multi-tenant from the dashboard (Overview screen) or using the API.

<Tabs groupId="examples">
<TabItem value="js" label="JavaScript">

```js
// shows the current status
const appSettings = await client.getAppSettings();
console.log(appSettings.app.multi_tenant_enabled);

// enables teams
client.updateAppSettings({
multi_tenant_enabled: true,
});
Expand All @@ -37,12 +40,18 @@ client.updateAppSettings({
<TabItem value="py" label="Python">

```py
client.update_app(multi_tenant_enabled=enabled)
# shows the current status
print(client.get_app().data.app.multi_tenant_enabled)

# enables teams
client.update_app(multi_tenant_enabled=True)
```

</TabItem>
</Tabs>

Please keep in mind that enabling/disabling multi-tenant changes permission checking for your users. Do not change this on a production app without testing that your integration supports it correctly.

## User teams

When multi-tenant is enabled, users can only be created from your back-end. This is necessary to ensure that a user cannot pick its own team/tenant.
Expand Down

0 comments on commit 3f5a08d

Please sign in to comment.