Commit 8f9c712
committed
feat: Force users to change password when using default password (#1282)
Add password change enforcement for users using default passwords or when
password_change_required flag is set:
- Add password_change_required field to EmailUser model with migration
- Check if user is using default password on login and force change
- Add /admin/change-password-required page with form for password change
- Add admin endpoint to force password change for specific users
- Set password_change_required=true for bootstrap admin user
- Return 403 with X-Password-Change-Required header for API login
- Add Force Password Change button to admin user management UI
Closes #1282
Signed-off-by: Mihai Criveti <[email protected]>1 parent 2840f43 commit 8f9c712
File tree
11 files changed
+1280
-32
lines changed- mcpgateway
- alembic/versions
- routers
- templates
- utils
11 files changed
+1280
-32
lines changedLarge diffs are not rendered by default.
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
| 293 | + | |
293 | 294 | | |
294 | 295 | | |
295 | 296 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
482 | 482 | | |
483 | 483 | | |
484 | 484 | | |
| 485 | + | |
485 | 486 | | |
486 | 487 | | |
487 | 488 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
228 | 250 | | |
229 | 251 | | |
230 | 252 | | |
| |||
502 | 524 | | |
503 | 525 | | |
504 | 526 | | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
505 | 532 | | |
506 | 533 | | |
507 | 534 | | |
| |||
578 | 605 | | |
579 | 606 | | |
580 | 607 | | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
588 | 621 | | |
589 | 622 | | |
590 | 623 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4865 | 4865 | | |
4866 | 4866 | | |
4867 | 4867 | | |
| 4868 | + | |
4868 | 4869 | | |
4869 | 4870 | | |
4870 | 4871 | | |
| |||
4885 | 4886 | | |
4886 | 4887 | | |
4887 | 4888 | | |
| 4889 | + | |
4888 | 4890 | | |
4889 | 4891 | | |
4890 | 4892 | | |
| |||
0 commit comments