-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
team: webappIssue belongs to the WebApp teamIssue belongs to the WebApp team
Description
In order to correctly attribute usage to either user or a team, we need to update our Workspace Instance attribution logic.
An usageAttributionid should always be set on a WorkspaceInstance, irrespective if the installation is SaaS or Self-hosted.
The logic to determine the usageAttributionId is as follows (in order of priority):
- The user has made an explicit choice in their user settings and have configured the
User.usageAttributionId. - The user is a member of exactly one entity from (user, team 1, team 2) which has billing enabled. If there is exactly such choice, then the attribution is not ambiguous and the one entity is used.
- The choice is ambigous. In this case the user must be prompted to set the entity to which to attribute usage for the WorkspaceInstance currently being started. On the server, this should be reported as a typed error and the user should be prompted to specify the
usageAttributionIdas part of the WorkspaceInstance create request.
Metadata
Metadata
Assignees
Labels
team: webappIssue belongs to the WebApp teamIssue belongs to the WebApp team
Type
Projects
Status
Done