Commit b784ef9
committed
Fix membership edit crash when only complements update is allowed
`can_member_update?` returns true when complement updates are allowed,
but the membership edit page only handles depot changes. When depot
update is disabled, the form renders empty and submitting it raises
`ActionController::ParameterMissing: param is missing or the value
is empty or invalid: membership`. Guard both the edit link and the
controller action with `can_member_update_depot?`.1 parent 7d67f55 commit b784ef9
2 files changed
Lines changed: 2 additions & 2 deletions
File tree
- app
- controllers/members
- views/members/memberships
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
0 commit comments