File Repository issueshttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues2024-03-05T10:46:04+01:00https://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/45Spotbugs2024-03-05T10:46:04+01:00Matija ObrezaSpotbugsAdd Spotbugs to gradle as in genesys-pgr/application-blocks!147 and fix the obvious problems.Add Spotbugs to gradle as in genesys-pgr/application-blocks!147 and fix the obvious problems.5.2Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/44Dependencies2023-10-12T20:35:58+02:00Matija ObrezaDependenciesCheck https://sbom.sonatype.com/report/T1-118f0f57da8c6b3097cc-378c01d9c77d3-1695215191-a829ea95f2d2446889e7d748bd0ac9f8 and update dependencies.Check https://sbom.sonatype.com/report/T1-118f0f57da8c6b3097cc-378c01d9c77d3-1695215191-a829ea95f2d2446889e7d748bd0ac9f8 and update dependencies.5.1Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/43DatabaseBytesStorage2022-09-06T15:58:45+02:00Matija ObrezaDatabaseBytesStorageSome want to store all the file bytes in their database for simple backup and restore. This is mostly usable for smaller genebanks.
Please add a new `DatabaseStorageServiceImpl` that will keep bytes in the database.Some want to store all the file bytes in their database for simple backup and restore. This is mostly usable for smaller genebanks.
Please add a new `DatabaseStorageServiceImpl` that will keep bytes in the database.4.0Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/42Extract ZIP archive2022-03-31T14:39:14+02:00Matija ObrezaExtract ZIP archiveAdd API option to extract an existing ZIP archive in file repository into the current folder. The source `.zip` file should remain in the folder.
Folders in the ZIP file needs to be recreated in the folder of the archive file.
For the ...Add API option to extract an existing ZIP archive in file repository into the current folder. The source `.zip` file should remain in the folder.
Folders in the ZIP file needs to be recreated in the folder of the archive file.
For the Unit test you can recycle the *downloadZip()*, upload to another folder and unpack it.3.2Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/41Download folder as Zip archive2022-03-18T18:31:57+01:00Matija ObrezaDownload folder as Zip archiveAdd the API to stream the contents of selected folder as a ZIP archive.Add the API to stream the contents of selected folder as a ZIP archive.3.2Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/40webp thumbnails2022-03-15T21:03:12+01:00Matija Obrezawebp thumbnailsI would like to add support for `.webp` thumbnail generation from source images.
https://github.com/haraldk/TwelveMonkeys
```xml
<dependency>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio-webp</artifactId>
<versi...I would like to add support for `.webp` thumbnail generation from source images.
https://github.com/haraldk/TwelveMonkeys
```xml
<dependency>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio-webp</artifactId>
<version>3.8.1</version>
</dependency>
```
Please note the instructions in https://github.com/haraldk/TwelveMonkeys#deploying-the-plugins-in-a-web-app3.2Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/39Renaming folders: Security aspects2021-11-05T19:38:08+01:00Matija ObrezaRenaming folders: Security aspectsPlease update the `renameFolder` method to properly check that the user has `MANAGE` permission on the source folder -- and that the user has `WRITE` permission in the destination folder (if it exists -- or `ADMINISTRATOR` role if target...Please update the `renameFolder` method to properly check that the user has `MANAGE` permission on the source folder -- and that the user has `WRITE` permission in the destination folder (if it exists -- or `ADMINISTRATOR` role if target parent is `/`).
After creating the new `RepositoryFolder` the permissions assigned directly to the source folder are **copied** to the target folder.3.2Artem HrybeniukArtem Hrybeniukhttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/38Upgrade dependencies2021-07-23T11:03:36+02:00Matija ObrezaUpgrade dependenciesPlease upgrade maven dependencies where possible.Please upgrade maven dependencies where possible.3.1Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/37Test coverage 70%2021-07-23T14:14:46+02:00Matija ObrezaTest coverage 70%In this ticket add unit tests or remove unused code from this project to reach code coverage of **70%**.In this ticket add unit tests or remove unused code from this project to reach code coverage of **70%**.3.2Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/36Java 112021-01-04T11:17:00+01:00Maxym BorodenkoJava 11Upgrade to Java 11.Upgrade to Java 11.3.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/35Always generate thumbnails for images2020-08-18T11:29:07+02:00Matija ObrezaAlways generate thumbnails for imagesThe current implementation generates image thumbnails only for images that are linked to an image gallery.
It would be more sensible to generate thumbnails for any image added to the file repository and then remove the thumbnails when ...The current implementation generates image thumbnails only for images that are linked to an image gallery.
It would be more sensible to generate thumbnails for any image added to the file repository and then remove the thumbnails when the image is removed.
Please move thumbnail generation to `RepositoryServiceImpl`.
This will be helpful for grin-global/grin-global-ui!792.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/33Bump version2020-04-03T09:33:05+02:00Matija ObrezaBump version!38 and #32 introduce a database model change. Bump version.!38 and #32 introduce a database model change. Bump version.1.1Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/32JOINED inheritance strategy2020-04-03T09:35:41+02:00Matija ObrezaJOINED inheritance strategy`RepositoryFile` uses `TABLE_PER_CLASS` inheritance strategy and that's causing performance problems when querying (e.g. `Dataset#files` problem described in genesys-pgr/genesys-server#509).
Simple testing (comments in genesys-pgr/gene...`RepositoryFile` uses `TABLE_PER_CLASS` inheritance strategy and that's causing performance problems when querying (e.g. `Dataset#files` problem described in genesys-pgr/genesys-server#509).
Simple testing (comments in genesys-pgr/genesys-server!535) shows that using JOINED inheritance results in much better performance.
Update code and `liquibase-changeLog.yml` for use of `@Inheritance(strategy = InheritanceType.JOINED)` in `RepositoryFile` class.
Database migration must include:
1. Copy data from `repository_image` to `repository_file`
1. Drop unnecessary columns.
1. Copy data from `repository_document` to `repository_file`
1. Drop unnecessary columns.
I hope that primary key `id` is unique across these tables.1.1Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/31FileRepository metadata file name conflict2020-01-31T10:41:08+01:00Matija ObrezaFileRepository metadata file name conflict`MetadataInStorageAspect` saves `{uuid}.json` next to the `{uuid}{extension}` file.
When the extension is `.json`, the metadata will overwrite actual file contents.`MetadataInStorageAspect` saves `{uuid}.json` next to the `{uuid}{extension}` file.
When the extension is `.json`, the metadata will overwrite actual file contents.Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/30Blacklist originalFilenames in Repository2019-10-18T16:37:43+02:00Matija ObrezaBlacklist originalFilenames in RepositoryWe need a mechanism to prevent users from uploading `Thumbs.db` and files starting with `.` or `~`.
The configuration options should be declared in *application.properties*.
`addFile` or `addImage` should throw an exception if the `rep...We need a mechanism to prevent users from uploading `Thumbs.db` and files starting with `.` or `~`.
The configuration options should be declared in *application.properties*.
`addFile` or `addImage` should throw an exception if the `repositoryFile.originalFilename` is invalid.
Perhaps use the ant file matcher instead of regexp?Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/29Apache Mina logging2023-09-01T08:17:21+02:00Matija ObrezaApache Mina loggingPlease explore how we can reduce the verbosity of apache mina (FTP). The logs are filling up with:
```
10:02:50,349 pool-4-thread-19 ERROR o.a.f.i.DefaultFtpHandler:157 - Exception caught, closing session
javax.net.ssl.SSLHandshakeExce...Please explore how we can reduce the verbosity of apache mina (FTP). The logs are filling up with:
```
10:02:50,349 pool-4-thread-19 ERROR o.a.f.i.DefaultFtpHandler:157 - Exception caught, closing session
javax.net.ssl.SSLHandshakeException: SSL handshake failed.
at org.apache.mina.filter.ssl.SslFilter.messageReceived(SslFilter.java:519)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:542)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:48)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:947)
at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:109)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:542)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:535)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:703)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:659)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:648)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:68)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1120)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at sun.security.ssl.EngineInputRecord.bytesInCompletePacket(EngineInputRecord.java:156)
at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:868)
at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:781)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
at org.apache.mina.filter.ssl.SslHandler.unwrap(SslHandler.java:754)
at org.apache.mina.filter.ssl.SslHandler.unwrapHandshake(SslHandler.java:689)
at org.apache.mina.filter.ssl.SslHandler.handshake(SslHandler.java:575)
at org.apache.mina.filter.ssl.SslHandler.messageReceived(SslHandler.java:360)
at org.apache.mina.filter.ssl.SslFilter.messageReceived(SslFilter.java:500)
... 15 more
```
Can we just log the exception message?Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/28Hibernate 52020-04-14T09:15:16+02:00Matija ObrezaHibernate 5The project works with Hibernate 4. Update to Hibernate 5.
genesys-pgr/application-blocks#31The project works with Hibernate 4. Update to Hibernate 5.
genesys-pgr/application-blocks#312.0Maxym BorodenkoMaxym Borodenkohttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/27FTP and Spring Security2018-08-31T17:38:20+02:00Matija ObrezaFTP and Spring SecurityWe introduced permission checks on RepositoryService some time ago. The FTP server does not switch to the currently logged
in user when invoking repository methods.We introduced permission checks on RepositoryService some time ago. The FTP server does not switch to the currently logged
in user when invoking repository methods.1.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/26Permission checks fail2018-04-30T12:52:49+02:00Matija ObrezaPermission checks failPermission checks fail because of different parameter names between the interface and service implementation.
genesys-pgr/application-blocks#29Permission checks fail because of different parameter names between the interface and service implementation.
genesys-pgr/application-blocks#291.0Matija ObrezaMatija Obrezahttps://gitlab.croptrust.org/genesys-pgr/file-repository/-/issues/25"Owning entity" of repository file2020-04-14T08:41:12+02:00Matija Obreza"Owning entity" of repository fileFor purposes of automatic cleanup (deleting files from repository) and permission management we need to somehow record what entity "owns" the repository entry.
1. Adding a file must require specifying its owning entity and when that ent...For purposes of automatic cleanup (deleting files from repository) and permission management we need to somehow record what entity "owns" the repository entry.
1. Adding a file must require specifying its owning entity and when that entity is removed, we should also remove the files associated with it.
1. The owning entity, when an instance of `AclEntity`, should also provide default permissions for the file.
All calls to add repository file should somehow provide information on the owning entity. But because we don't know the rest of the data model that may be difficult.
We need an entity listener that will delete files associated with entities that no longer exist.
In some cases, the owning entity could be the `Folder` implemented in #23 but even that entity requires an owner.1.1