[Zope-CMF] CMF Dogbowl Members

Tres Seaver tseaver@palladion.com
Sun, 12 Aug 2001 20:27:25 -0400


Tim Fouracre wrote:

> Hi
> I thought I'd sort out my Index Page on the Dogbowl site, and then 
> peruse other members pages. However when you view the members in the 
> Roster on the CMF Dogbowl site, something really annoying happens!
> 
> If you try and click on a Members link to their index page, the majority 
> of them come up with an authorisation box, and when you cancel bring up 
> a 'You are not authorised' error page.
> 
> Now I thought that if a member has NOT published their Index Page, but 
> has set themselves as listed, then there simply appear in the roster, 
> but there is no link to their Index Page. So why has this default been 
> changed, as at the moment it is pot luck as to whether you click on a 
> members link that actually takes you to their index page!

The actual code in question looks like this:

     def getHomeFolder(self, id=None, verifyPermission=0):
         """Returns a member's home folder object."""
         if id is None:
             member = self.getAuthenticatedMember()
             if not hasattr(member, 'getMemberId'):
                 return None
             id = member.getMemberId()
         if hasattr(self, 'Members'):
             try:
                 folder = self.Members[id]
                 if verifyPermission and not _checkPermission('View', 
folder):
                     # Don't return the folder if the user can't get to it.
                     return None
                 return folder
             except KeyError: pass
         return None

We *used* to have things set up so that only the owner had
'View' permission by default on their folder, but removed that
restriction to work around other problems;  now the workflow
status of a content object governs its visibility, rather than
funky permission mappings.

This code should now be testing the visibility of whatever object
corresponds to the 'view' action of the folder, rather than checking
permissions on the folder itself.

Please enter this as a tracker issue:

   http://www.zope.org/Products/PTK/Tracker

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com