Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4e3ea79

Browse files
committed
PR comments
1 parent6695e64 commit4e3ea79

File tree

4 files changed

+17
-13
lines changed

4 files changed

+17
-13
lines changed

‎coderd/coderd.go‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,6 @@ func New(options *Options) *API {
275275
options.Entitlements=entitlements.New()
276276
}
277277
ifoptions.IDPSync==nil {
278-
// If this is set in the options, it is probably the enterprise
279-
// version of the code.
280278
options.IDPSync=idpsync.NewAGPLSync(options.Logger, idpsync.SyncSettings{
281279
OrganizationField:options.DeploymentValues.OIDC.OrganizationField.Value(),
282280
OrganizationMapping:options.DeploymentValues.OIDC.OrganizationMapping.Value,

‎coderd/idpsync/idpsync.go‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@ type SyncSettings struct {
5252
OrganizationAssignDefaultbool
5353
}
5454

55+
typeOrganizationParamsstruct {
56+
// SyncEnabled if false will skip syncing the user's organizations.
57+
SyncEnabledbool
58+
// IncludeDefault is primarily for single org deployments. It will ensure
59+
// a user is always inserted into the default org.
60+
IncludeDefaultbool
61+
// Organizations is the list of organizations the user should be a member of
62+
// assuming syncing is turned on.
63+
Organizations []uuid.UUID
64+
}
65+
66+
5567
funcNewAGPLSync(logger slog.Logger,settingsSyncSettings)*AGPLIDPSync {
5668
return&AGPLIDPSync{
5769
Logger:logger.Named("idp-sync"),

‎coderd/idpsync/organization.go‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,6 @@ func (s AGPLIDPSync) ParseOrganizationClaims(_ context.Context, _ jwt.MapClaims)
3030
},nil
3131
}
3232

33-
typeOrganizationParamsstruct {
34-
// SyncEnabled if false will skip syncing the user's organizations.
35-
SyncEnabledbool
36-
// IncludeDefault is primarily for single org deployments. It will ensure
37-
// a user is always inserted into the default org.
38-
IncludeDefaultbool
39-
// Organizations is the list of organizations the user should be a member of
40-
// assuming syncing is turned on.
41-
Organizations []uuid.UUID
42-
}
43-
4433
// SyncOrganizations if enabled will ensure the user is a member of the provided
4534
// organizations. It will add and remove their membership to match the expected set.
4635
func (sAGPLIDPSync)SyncOrganizations(ctx context.Context,tx database.Store,user database.User,paramsOrganizationParams)error {

‎enterprise/coderd/enidpsync/enidpsync.go‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ import (
77
"github.com/coder/coder/v2/coderd/idpsync"
88
)
99

10+
// EnterpriseIDPSync enabled syncing user information from an external IDP.
11+
// The sync is an enterprise feature, so this struct wraps the AGPL implementation
12+
// and extends it with enterprise capabilities. These capabilities can entirely
13+
// be changed in the Parsing, and leaving the "syncing" part (which holds the
14+
// more complex logic) to the shared AGPL implementation.
1015
typeEnterpriseIDPSyncstruct {
1116
entitlements*entitlements.Set
1217
*idpsync.AGPLIDPSync

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp