dachcom-digital / pimcore-members

Pimcore Object, Asset and Document Restriction & Frontend Authentication
Other
54 stars 34 forks source link

[Protected Asset Downloader] Allow S3 assets to be protected #173

Closed aarongerig closed 1 year ago

aarongerig commented 1 year ago
Q A
Branch? 3.x
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets #172

This PR removes the PIMCORE_ASSET_DIRECTORY prefix, if the file is served from an S3 bucket. Therefore it will be possible to use assets stored on S3 to be downloaded via the protected asset downloader.

aarongerig commented 1 year ago

Anything else for it to be merged? :)

solverat commented 1 year ago

Hey @aarongerig sorry for the late response. I've already checked your PR some weeks ago and had some thoughts on this.

I'm not quite sure, if this is the right way to go. Your approach only allows S3, but there could be also a different asset storage.

I think we should solve this by using the flysystem storage, like pimcore does.

aarongerig commented 1 year ago

Hi @solverat No worries. I definitey get your point and agree that it shoulf be solved more flexibly. This PR is only meant as a quick fix for Pimcore 6. Starting with Pimcore 10 flysystem is the way to go.

solverat commented 1 year ago

Ah, sorry. Please also add a short upgrade note for 3.1.6 here: https://github.com/dachcom-digital/pimcore-members/blob/3.x/UPGRADE.md

aarongerig commented 1 year ago

@solverat Done!

solverat commented 1 year ago

@aarongerig Here you go: 3.1.6