Repository navigation
Commit 6691b47
Fleetbase Security
fix: restore User::activate() in activate() endpoint to update both user and companyUser status
Activation must update both users.status and company_users.status
because a newly created user starts with a global status of 'inactive'.
Only updating the CompanyUser record would leave users.status as
'inactive', blocking the user from accessing any organisation.
Deactivation remains scoped to the CompanyUser record only (previous
commit) so that deactivating a user in one organisation does not lock
them out of other organisations they belong to.
Refs: GHSA-3wj9-hh56-7fw71 parent 3c2d87d commit 6691b47
1 file changed
Lines changed: 8 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
481 | 481 | | |
482 | 482 | | |
483 | 483 | | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
494 | 491 | | |
495 | 492 | | |
496 | 493 | | |
497 | | - | |
| 494 | + | |
498 | 495 | | |
499 | 496 | | |
500 | 497 | | |
| |||
0 commit comments