mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +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:
@ -115,6 +115,7 @@ func User(user database.User, organizationIDs []uuid.UUID) codersdk.User {
|
||||
OrganizationIDs: organizationIDs,
|
||||
Roles: make([]codersdk.Role, 0, len(user.RBACRoles)),
|
||||
AvatarURL: user.AvatarURL.String,
|
||||
LoginType: codersdk.LoginType(user.LoginType),
|
||||
}
|
||||
|
||||
for _, roleName := range user.RBACRoles {
|
||||
|
Reference in New Issue
Block a user