mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +00:00
feat: synchronize oidc user roles (#8595)
* feat: oidc user role sync User roles come from oidc claims. Prevent manual user role changes if set. * allow mapping 1:many
This commit is contained in:
@ -69,6 +69,7 @@ func New(ctx context.Context, options *Options) (_ *API, err error) {
|
||||
}()
|
||||
|
||||
api.AGPL.Options.SetUserGroups = api.setUserGroups
|
||||
api.AGPL.Options.SetUserSiteRoles = api.setUserSiteRoles
|
||||
api.AGPL.SiteHandler.AppearanceFetcher = api.fetchAppearanceConfig
|
||||
api.AGPL.SiteHandler.RegionsFetcher = func(ctx context.Context) (any, error) {
|
||||
// If the user can read the workspace proxy resource, return that.
|
||||
@ -405,6 +406,7 @@ func (api *API) updateEntitlements(ctx context.Context) error {
|
||||
// FeatureAdvancedTemplateScheduling.
|
||||
codersdk.FeatureTemplateRestartRequirement: api.DefaultQuietHoursSchedule != "",
|
||||
codersdk.FeatureWorkspaceProxy: true,
|
||||
codersdk.FeatureUserRoleManagement: true,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user