Commit cd698ca
committed
Add missing @PreAuthorize to ProcessRestRepository#delete
DELETE /api/system/processes/{id} had no method-level authorization
check, unlike its siblings (findOne, findAll, findByCurrentUser). The
only check lived inside ProcessServiceImpl#delete's per-bitstream
loop, so a process with zero bitstreams (e.g. status SCHEDULED)
skipped the loop entirely and bypassed authorization, letting an
anonymous DELETE remove any process record.
Adds hasPermission(#integer, 'PROCESS', 'DELETE'), matching findOne.
Reuses the existing ProcessRestPermissionEvaluatorPlugin (owner-or-
admin check, independent of READ/WRITE/DELETE) - no new plugin needed.
Originated from security audit (2026_07_20_dq)1 parent 00501a2 commit cd698ca
1 file changed
Lines changed: 1 addition & 0 deletions
File tree
- dspace-server-webapp/src/main/java/org/dspace/app/rest/repository
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
| |||
0 commit comments