Commit 1af753d
committed
Allow ExCS admin to set starter project user_id
Specifically to set `Project#user_id` to `nil` to signify a starter (or
"public") project which can be viewed by anonymous users.
The logic in `Api::ProjectsController#project_params` is a bit hard to
follow. However, essentially we need to avoid the
`base_params.merge(user_id: current_user&.id)` line in the `else` branch
to avoid `Project#user_id` being set to the current user's ID.1 parent c8254d8 commit 1af753d
File tree
2 files changed
+10
-2
lines changed- app/controllers/api
- spec/features/project
2 files changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
| 85 | + | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
221 | 222 | | |
222 | 223 | | |
223 | 224 | | |
| |||
259 | 260 | | |
260 | 261 | | |
261 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
262 | 270 | | |
263 | 271 | | |
0 commit comments