Commit 40c4399d authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

fixed transactional issue in FileController

parent e1e2b978
Pipeline #11777 failed with stage
in 12 minutes and 28 seconds
......@@ -40,7 +40,7 @@ public class FileController extends BaseController {
return fileRest.getFile(id);
@PreAuthorize("@uploadedFileEntryDao.getById(#id).owner?.login ==")
@PreAuthorize("@fileService.getById(#id)?.owner?.login ==")
@PostMapping(value = "/{id}:uploadContent")
public Map<String, Object> uploadContent(@PathVariable(value = "id") String id, @RequestBody byte[] data)
throws ObjectNotFoundException {
import lcsb.mapviewer.model.cache.UploadedFileEntry;
import lcsb.mapviewer.persist.dao.cache.UploadedFileEntryDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
public class FileService implements IFileService {
private UploadedFileEntryDao uploadedFileEntryDao;
public FileService(UploadedFileEntryDao uploadedFileEntryDao) {
this.uploadedFileEntryDao = uploadedFileEntryDao;
public UploadedFileEntry getById(int id) {
return uploadedFileEntryDao.getById(id);
import lcsb.mapviewer.model.cache.UploadedFileEntry;
public interface IFileService {
UploadedFileEntry getById(int id);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment