By norti on
Hello.
I've been looking through the modules but I haven't really found anything to do the following: I have some attachments I only want users who have special accounts (special role) to be able to see and access. The rest of node (text, tables, etc.) must be visible for all logged users. In other words, I want to give ONLY attachment permissions for some roles, in the same style like giving WHOLE node permissions using 'nodeaccess' or 'node privacy by role'. Any idea how to do this ?
Thanks
Comments
I have not tried this
I have not tried this combination, but it seems a reasonable idea to try:
http://drupal.org/project/filefield
http://drupal.org/project/cck_field_perms
Access Control > Upload
Access Control > Upload Module > view uploaded files.
Is that what you wanted?
I know the CCK File + CCK
I know the CCK File + CCK Perms idea (and idea with Upload module + Admin -> User access panel), but I want that every user should have rights to give attachment permission to other user groups when Adding or Editing a node, not from Admin -> User access panel. (like here, using 'node privacy by role' -> http://img219.imageshack.us/img219/1059/nodeaccesssl5.gif but only for attachment permissions). Thanks for reply
I believe you define whether to display individual attachments
When you upload attachments to a node, there is a checkbox labeled 'list' next to each file. I think this indicates whether the file should be listed on the view of the node. Users attaching files would be able to decide on an individual file basis whether or not to hide the files in the view.
------------------------------
http://fraggles.artsci.wustl.edu (Drupal user documentation and development blog)
Yes, when you upload
Yes, when you upload attachments to a node, and then edit a node, you can check or uncheck the checkbox ('View' or 'Erase') next to each attachment, when you uncheck 'View', the file won't be visible on the node. But, firstly, it's only way to hide a link to a file (files are still available to download when you put the complete link in a browser), and secondly, this way don't give us ability of setting attachment permissions to some roles (we can only show or hide the attachments for all roles).
Something else to try (I
Something else to try (I haven't)
http://drupal.org/project/private_upload
It adds a "private" checkbox to the upload form which is supposed to make those files behave like Drupal's "private" files. I guess this means "stored outside the web root and accessed as "system/files/filename" only by the roles with permissions to view uploaded files and to view the node".
It might work if you set up the unwanted roles without "view uploaded files".
Yes, it works when I set
Yes, it works when I set "View uploaded files" rights in Admin->User Access, but this module doesn't allow Every user to change the file permissions when Adding or Editing a node (like nodeaccess for node access permissions).
I think the good way to solve this problem is to create several CCK file fields (one for each group role - File_for_Group1, File_for_Group2, File_for_Group3, etc.) in a new segment and give them (with CCK Field permissions module) appriopriate permissions (Group1 would be able to see only the File_for_Group1 fields etc.). When users will be adding some attachments, they should use appriopriate CCK field (ex. File_for_Group3), but there is also a bad side of this solution (When I want to upload a file and give permissions to 2 or 3 groups, I have to upload 2-3 times the same file using various CCK file fields).
Any other solutions ? Thx