Admin user roles for Assets

Hi!

I think this will be a continuation of this topic [IMPLEMENTED] Role for Assets

It would be nice to be able to restrict access to individual folders with all their contents and to individual files.
Perhaps this can be partially implemented through tags and scripts. But at the moment, scripts do not work for this case.

Access to assets inside the admin panel is only global. When I give someone access to files, they have access to all files without exception.
I can prohibit updates, but absolutely all files are available for reading to this user.
Scripts help solve this issue only between clients, but not between users inside the admin panel.

I believe many are already waiting for this feature.

In my case, files with coupons for discounts in the store will be added to the site. I would like to limit access to them as much as possible.

Thanks.

A workaround would be to have a second app. But of course linking is difficult then.

I am also considering this option. Yes, there are subtleties with linking. Also, the access parameters of roles can change over time. Something opens, something closes.

I think it is super complicated.

Lets say user A adds an asset to a field that he is allowed to see and user B opens the content. What is supposed to happen?

As I understand it, user B is only allowed to see content that has a field with an asset, but does not have access to this asset. Similar behavior already exists - if a user does not have access to assets but is allowed to see content with a field with assets, then this user is shown content, but the field with the asset is empty.

Then, according to this logic, in the new behavior in the content of the field with assets, you need to filter the list of assets by access and not show those assets that are not accessible.

But perhaps it will be necessary to show the total number of assets in the field even if they are not accessible. This is so that the user understands that some files are not available to him and he needs to request access or transfer the task of working with files to someone who has access.

If you just filter them out you would remove the assets when you would save the content

Currently the asset field is ignored when saving.

As an option, I see here allowing CRUD operations only with assets to which current user has access. The rest of the assets in the field list remain unchanged. Also do the same for clients.