[Zope] Folder visibility

J. Cameron Cooper jccooper@rice.edu
Thu, 02 Aug 2001 09:44:17 -0500


>
>
>I'm working on a site that will have multiple users.  Each user should only
>be allowed to see the folders that they need to see.  How do I control the
>visibility of folders based on users?  I only see how to do it based on
>roles.  
>
Local roles save the day again:

- create a 'FolderViewer' role. At the root level give it the 
permissions to view the folder. Probably 'View' and 'List contents' or 
something. Do not give it to your users on a global level (in the 
acl_users folder.)
- in each folder, use local roles to give the 'FolderViewer' role to 
those users who should see it.

You'll probably want to disable the folder viewing permisisons for 
whatever role your users usually are. Probably 'Anonymous' (or 
'Authenticated' in 2.4) in a default install.

This is very similar to what you might do with multiple 'Owners', but 
more flexible (and without letting them change things.)

            --jcc
        (local roles are fun)