Skip to content

Commit e3f484f

Browse files
rudra-superrrGMishx
authored andcommitted
fix(attachment): Restrict access to security user.
Signed-off-by: rudra-superrr <prabhuchopra@gmail.com>
1 parent 6659cf9 commit e3f484f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

rest/resource-server/src/main/java/org/eclipse/sw360/rest/resourceserver/attachment/AttachmentController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ public ResponseEntity<CollectionModel<EntityModel<Attachment>>> createAttachment
160160
}
161161
final User sw360User = restControllerHelper.getSw360UserFromAuthentication();
162162
List<EntityModel<Attachment>> attachments = new ArrayList<>();
163+
restControllerHelper.throwIfSecurityUser(sw360User);
163164
for (MultipartFile file: files) {
164165
Attachment attachment = attachmentService.addAttachment(file, sw360User);
165166
attachments.add(EntityModel.of(attachment));

0 commit comments

Comments
 (0)