Commit 0ab495e
committed
fix(dashboard): use updateActiveAdministrator for profile page
The profile page used the updateAdministrator mutation which requires
Permission.UpdateAdministrator, preventing administrators without that
permission from editing their own profile (name, email, password).
Switch to updateActiveAdministrator which is gated by Permission.Owner
and resolves the target from ctx.activeUserId, so any authenticated
administrator can edit their own profile without needing elevated
permissions.
- Replace updateAdministratorDocument with updateActiveAdministratorDocument
- Remove id from setValuesForUpdate (UpdateActiveAdministratorInput has
no id field; the server infers it from the active user)
Fixes #50351 parent db8482a commit 0ab495e
2 files changed
Lines changed: 5 additions & 6 deletions
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
0 commit comments