Download permission based on mime type of assets


#1

Hi,

I’m new to Pimcore and Symfony but I’ve got some experience in Python and Django, now I’d like to add a feature to my Pimcore DAM&PIM so that I can grant a download permission to the users based on mime type of assets.

for example, a designer can upload her/his PSD file and can download the original PSD file and the other type (Original File, Web Format,…) but the other can just download the JPG file, not the PSD (Original File). I mean other can only download the web format, print format plus office format.

Any clue would be greatly appreciated. :slight_smile:

thanks


#2

Hi,
currently not possible out-of-the-box.
But similar to this https://pimcore.com/docs/5.x/Development_Documentation/Best_Practice/Modifying_Permissions_based_on_Object_Data.html it should also be possible for assets.

BR
Christian


#3

Hi,

thanks for your help, I’ve followed the instruction in the link but, now I’m getting this error, I’ve searched the Net and tried theme but still not working.

I’m getting the following error:

Type error: Argument 1 passed to AppBundle\EventListener\Download::__construct() must be an instance of AppBundle\EventListener\UserLoader, instance of Pimcore\Bundle\AdminBundle\Security\User\UserLoader given, called in /home/administrator/pimcore.local/public_html/var/cache/dev/ContainerDowjwvc/getApp_EventListener_MyEventListnerService.php on line 8