Commit 8e155b7
fix: address Devin Review - privilege escalation guards, read_user_by_id role check, AuditLogPublic type
- Add privilege escalation check in create_user: only Super Admin can create Super Admin
- Add privilege escalation checks in update_user: only Super Admin can modify/promote to Super Admin
- Fix read_user_by_id to use role-based check instead of is_superuser
- Add target_user_email and performed_by_email fields to frontend AuditLogPublic type
Co-Authored-By: daniel.resgate <daniel.rider69@gmail.com>1 parent 807fc45 commit 8e155b7
File tree
2 files changed
+37
-1
lines changed- backend/app/api/routes
- frontend/src/client
2 files changed
+37
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
68 | 78 | | |
69 | 79 | | |
70 | 80 | | |
| |||
199 | 209 | | |
200 | 210 | | |
201 | 211 | | |
202 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
203 | 219 | | |
204 | 220 | | |
205 | 221 | | |
| |||
231 | 247 | | |
232 | 248 | | |
233 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
234 | 268 | | |
235 | 269 | | |
236 | 270 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| 239 | + | |
| 240 | + | |
239 | 241 | | |
240 | 242 | | |
241 | 243 | | |
| |||
0 commit comments