Hello,

I would like to restrict the download of some file to some roles :
files a b c would be public
files d e f would be allowd to role one
files g h i would be allowed to role two.

I have checket assets and webfm none seems to allow that kind of policie and I have not found any module.

Maybe I have not found the right module ?

Comments

WorldFallz’s picture

perhaps private downloads + the node privacy by role module?

goudal’s picture

Well... it does not seems to work on files, just on the nodes....

WorldFallz’s picture

attach the files to nodes for access control and use private downloads to restrict access to the files themselves.

goudal’s picture

Yes, but private download does not seems work on a per role basis. Or did I miss something ?

I don't want that users can share direct links to the files...

goudal’s picture

Well, I did miss something ! Attached files are tied automatically to the node, the nid is stored, and than permission are checked against the node.

Shame on me.

Thanks to anyone for the tips.

WorldFallz’s picture

access control is handled by the node (which is why you have to attach the files to nodes). Private downloads prevents access directly to the files with links. You can't prevent people from linking to things, you can only prevent whether or not the link will be honored. Using private downloads means that the only way people will be able to get to the files is through the node access which is why you'll need the node access by role module to regulate node access to those nodes with file attachments by role.

saitanay’s picture

attach the files to the restricted nodes using the attach.module.

but its not a complete solution coz any user who can get a direct link to the file on your host can download the file.

this just hides the direct link.

like users can pass on the link from one to another.