Logo Search packages:      
Sourcecode: zope-cachefu version File versions  Download package

def CacheSetup::content::cache_tool::CacheTool::getMember (   self  ) 

Utility method for getting a member for use in expression contexts.  Returns
   the Member object for the currently authenticated member or None if the
   user is not authenticated.

Definition at line 483 of file cache_tool.py.

00483                        :
        """Utility method for getting a member for use in expression contexts.  Returns
           the Member object for the currently authenticated member or None if the
           user is not authenticated."""
        pm = getToolByName(self, 'portal_membership', None)
        # stick to the CachingPolicyManager expression convention
        if not pm or pm.isAnonymousUser():
            return None 
        else:
            return pm.getAuthenticatedMember()
        
    # a few methods for generating non-hideous default ids
    security.declareProtected(permissions.ManagePortal, 'generateUniqueId')
    def generateUniqueId(self, type_name):


Generated by  Doxygen 1.6.0   Back to index