Skip to content

Commit 1995c13

Browse files
committed
add interface method to allow api crud
1 parent 3263d99 commit 1995c13

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

coderd/idpsync/group.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ func (AGPLIDPSync) GroupSyncEnabled() bool {
2828
// AGPL does not support syncing groups.
2929
return false
3030
}
31+
func (s AGPLIDPSync) GroupSyncSettings() runtimeconfig.RuntimeEntry[*GroupSyncSettings] {
32+
return s.Group
33+
}
3134

3235
func (s AGPLIDPSync) ParseGroupClaims(_ context.Context, _ jwt.MapClaims) (GroupParams, *HTTPError) {
3336
return GroupParams{

coderd/idpsync/idpsync.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,12 @@ type IDPSync interface {
3636
// ParseGroupClaims takes claims from an OIDC provider, and returns the params
3737
// for group syncing. Most of the logic happens in SyncGroups.
3838
ParseGroupClaims(ctx context.Context, mergedClaims jwt.MapClaims) (GroupParams, *HTTPError)
39-
4039
// SyncGroups assigns and removes users from groups based on the provided params.
4140
SyncGroups(ctx context.Context, db database.Store, user database.User, params GroupParams) error
41+
// GroupSyncSettings is exposed for the API to implement CRUD operations
42+
// on the settings used by IDPSync. This entry is thread safe and can be
43+
// accessed concurrently. The settings are stored in the database.
44+
GroupSyncSettings() runtimeconfig.RuntimeEntry[*GroupSyncSettings]
4245
}
4346

4447
// AGPLIDPSync is the configuration for syncing user information from an external

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy