[support] Anonymous users access to some files and all nodes

Michelle Ziegmann michelle at media.berkeley.edu
Tue Feb 15 17:59:07 UTC 2011


Luke,

If for a particular node, you want to say that anon users can or can't 
access all of the files attached to that node, then Taxonomy Access 
Control should handle this (http://drupal.org/project/taxonomy_access).

If instead, on a particular node you want anonymous users to access some 
of the attached files but not others, then I would suggest creating 2 
different file fields - one for publicly-accessible files and one for 
private files.  Then just set content permissions for each field 
separately in the permissions table.

Michelle

On 2/15/2011 5:34 AM, Luke wrote:
> [Originally under: Access nodes but not files?]
>
> On Fri, 11 Feb 2011, Michelle Ziegmann wrote:
>
>> Enable the Content Permissions module (part of CCK).  Then go to
>> permissions, and you'll be able to define permissions for every field
>> individually.  As a caution with this though, you'll have to set
>> permissions every time you add a new field, or users won't be able to
>> view your content.
> Thanks, but I actually left out some information, as I noticed when
> verifying that in fact I had already done what you suggest.
>
> I need to have some files accessible by anonymous users.  The scenario is
> this:
>
> Anonymous users can see all nodes [of type X].
> Anonymous users can download some files [attached to nodes of X].
> Authenticated users can see all nodes [of type X].
> Authenticated users can download all files [attached to X nodes].
>
> I had hoped to avoid views for this, but it looks like that may not be
> possible.
>
> I have to use the same content type for both, so that content
> accessibility can be altered.
>
> I can use taxonomy to flag some content as publicly downloadable, and some
> as privately downloadable, and then structure a view to make the file
> field available only if public download is flagged in taxonomy for that
> node.
> I guess I could also use a CCK checkbox for this.
>
> I suppose what that means, is that I must prevent all access to that
> content type, and make it accessible only via a view.
>
> Does that sound like the most logical way to get this done?
>
> Thanks
>
> Luke

-- 
Michelle Ziegmann
===========================
Electronic Communications Specialist
University of California Berkeley
Educational Technology Services



More information about the support mailing list