|
| 1 | +package idp_sync |
| 2 | + |
| 3 | +import ( |
| 4 | +"context" |
| 5 | +"regexp" |
| 6 | + |
| 7 | +"github.com/coder/coder/v2/coderd/database" |
| 8 | +"github.com/coder/coder/v2/codersdk" |
| 9 | +) |
| 10 | + |
| 11 | +typeIDPSyncstruct { |
| 12 | +*codersdk.Entitlement |
| 13 | +} |
| 14 | + |
| 15 | +// SynchronizeGroupsParams |
| 16 | +typeSynchronizeGroupsParamsstruct { |
| 17 | +IDPGroups []string |
| 18 | +// TODO: These options will be moved outside of deployment into organization |
| 19 | +// scoped settings. So these parameters will be removed, and instead sourced |
| 20 | +// from some settings object that should have these values cached. |
| 21 | +// At present, these settings apply to the default organization. |
| 22 | +GroupFilter*regexp.Regexp |
| 23 | +CreateMissingGroupsbool |
| 24 | +} |
| 25 | + |
| 26 | +// SynchronizeGroups takes a given user, and ensures their group memberships |
| 27 | +// within a given organization are correct. |
| 28 | +funcSynchronizeGroups(ctx context.Context,tx database.Store,params*SynchronizeGroupsParams)error { |
| 29 | + |
| 30 | +returnnil |
| 31 | +} |