Commit 70ba7df
committed
fix: preserve existing OAuth user roles instead of resetting to default
- Modified reply_login function to check for existing users before role assignment
- Existing OAuth users now retain their current roles when OIDC provider doesn't return valid groups
- Only new users get assigned default roles when no valid groups are provided
- Fixes issue where existing OAuth users had their roles reset on every login1 parent 51d8fcd commit 70ba7df
1 file changed
+16
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
179 | 182 | | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
186 | 195 | | |
187 | 196 | | |
188 | 197 | | |
189 | 198 | | |
190 | | - | |
| 199 | + | |
191 | 200 | | |
192 | 201 | | |
193 | 202 | | |
| |||
0 commit comments