feat: use default org for PostUser (#12143)

Instead of assuming only 1 org exists, this uses the
is_default org to place a user in if not specified.
This commit is contained in:
Steven Masley
2024-02-16 08:28:36 -06:00
committed by GitHub
parent 0e1bad4f82
commit 2a8004b1b2
10 changed files with 101 additions and 13 deletions
+1
View File
@@ -102,6 +102,7 @@ type sqlcQuerier interface {
GetAuthorizationUserRoles(ctx context.Context, userID uuid.UUID) (GetAuthorizationUserRolesRow, error)
GetDBCryptKeys(ctx context.Context) ([]DBCryptKey, error)
GetDERPMeshKey(ctx context.Context) (string, error)
GetDefaultOrganization(ctx context.Context) (Organization, error)
GetDefaultProxyConfig(ctx context.Context) (GetDefaultProxyConfigRow, error)
GetDeploymentDAUs(ctx context.Context, tzOffset int32) ([]GetDeploymentDAUsRow, error)
GetDeploymentID(ctx context.Context) (string, error)