Repository navigation
Commit 5a4c48e
Restricted mock NCBI publication search test actions to dev mode
* The three actions (SetupMockNcbiService, RestoreNcbiService, RegisterMockPublication) swap a process-wide service and were reachable on production via a forge-able GET (ReadOnlyApiAction does no CSRF check), despite @RequiresSiteAdmin
* Added requireDevModeForMockNcbiService(): the actions now return 404 in non-dev mode
* Changed actions to MutatingApiAction (correct type for state mutation; also enforces a CSRF token)
* Updated PublicationSearchTest to use SimplePostCommand; verified passing with the mock (POST path) and against real NCBI
Co-Authored-By: Claude <noreply@anthropic.com>1 parent d3d8590 commit 5a4c48e
2 files changed
Lines changed: 21 additions & 7 deletions
File tree
- panoramapublic
- src/org/labkey/panoramapublic
- test/src/org/labkey/test/tests/panoramapublic
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
11233 | 11234 | | |
11234 | 11235 | | |
11235 | 11236 | | |
| 11237 | + | |
| 11238 | + | |
| 11239 | + | |
| 11240 | + | |
| 11241 | + | |
| 11242 | + | |
| 11243 | + | |
| 11244 | + | |
| 11245 | + | |
| 11246 | + | |
11236 | 11247 | | |
11237 | | - | |
| 11248 | + | |
11238 | 11249 | | |
11239 | 11250 | | |
11240 | 11251 | | |
11241 | 11252 | | |
| 11253 | + | |
11242 | 11254 | | |
11243 | 11255 | | |
11244 | 11256 | | |
11245 | 11257 | | |
11246 | 11258 | | |
11247 | 11259 | | |
11248 | | - | |
| 11260 | + | |
11249 | 11261 | | |
11250 | 11262 | | |
11251 | 11263 | | |
11252 | 11264 | | |
| 11265 | + | |
11253 | 11266 | | |
11254 | 11267 | | |
11255 | 11268 | | |
11256 | 11269 | | |
11257 | 11270 | | |
11258 | 11271 | | |
11259 | | - | |
| 11272 | + | |
11260 | 11273 | | |
11261 | 11274 | | |
11262 | 11275 | | |
11263 | 11276 | | |
| 11277 | + | |
11264 | 11278 | | |
11265 | 11279 | | |
11266 | 11280 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
344 | | - | |
| 344 | + | |
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
420 | | - | |
| 420 | + | |
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
450 | | - | |
| 450 | + | |
451 | 451 | | |
452 | 452 | | |
453 | 453 | | |
| |||
0 commit comments