@@ -12,7 +12,6 @@ import (
12
12
"github.com/coder/coder/v2/coderd/database"
13
13
"github.com/coder/coder/v2/coderd/database/db2sdk"
14
14
"github.com/coder/coder/v2/coderd/database/dbauthz"
15
- "github.com/coder/coder/v2/coderd/runtimeconfig"
16
15
"github.com/coder/coder/v2/coderd/util/slice"
17
16
)
18
17
@@ -44,7 +43,6 @@ func (s AGPLIDPSync) SyncGroups(ctx context.Context, db database.Store, user dat
44
43
ctx = dbauthz .AsSystemRestricted (ctx )
45
44
46
45
db .InTx (func (tx database.Store ) error {
47
- resolver := runtimeconfig .NewStoreResolver (tx )
48
46
userGroups , err := tx .GetGroups (ctx , database.GetGroupsParams {
49
47
HasMemberID : user .ID ,
50
48
})
@@ -62,7 +60,7 @@ func (s AGPLIDPSync) SyncGroups(ctx context.Context, db database.Store, user dat
62
60
// For each org, we need to fetch the sync settings
63
61
orgSettings := make (map [uuid.UUID ]GroupSyncSettings )
64
62
for orgID := range userOrgs {
65
- orgResolver := runtimeconfig . NewOrgResolver (orgID , resolver )
63
+ orgResolver := s . Manager . Scoped (orgID . String () )
66
64
settings , err := s .SyncSettings .Group .Resolve (ctx , orgResolver )
67
65
if err != nil {
68
66
return xerrors .Errorf ("resolve group sync settings: %w" , err )
0 commit comments