@@ -4,13 +4,15 @@ import (
4
4
"context"
5
5
"net/http"
6
6
7
+ "github.com/google/uuid"
8
+
7
9
"cdr.dev/slog"
8
10
"github.com/coder/coder/v2/coderd/database/dbauthz"
9
11
"github.com/coder/coder/v2/coderd/idpsync"
10
12
"github.com/coder/coder/v2/codersdk"
11
13
)
12
14
13
- func (e EnterpriseIDPSync )ParseOrganizationClaims (ctx context.Context ,mergedClaims map [string ]interface {}) (idpsync.OrganizationParams ,* HttpError ) {
15
+ func (e EnterpriseIDPSync )ParseOrganizationClaims (ctx context.Context ,mergedClaims map [string ]interface {}) (idpsync.OrganizationParams ,* idpsync. HttpError ) {
14
16
s := e .agpl
15
17
if ! e .entitlements .Enabled (codersdk .FeatureMultipleOrganizations ) {
16
18
// Default to agpl if multi-org is not enabled
@@ -19,6 +21,7 @@ func (e EnterpriseIDPSync) ParseOrganizationClaims(ctx context.Context, mergedCl
19
21
20
22
// nolint:gocritic // all syncing is done as a system user
21
23
ctx = dbauthz .AsSystemRestricted (ctx )
24
+ userOrganizations := make ([]uuid.UUID ,0 )
22
25
23
26
// Pull extra organizations from the claims.
24
27
if s .OrganizationField != "" {