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

def CMFMember::tools::memberdatacontainer::MemberDataContainer::handleOrphanedContent (   self,
  object,
  new_user = None 
)

Handle orphaned content.  If new_user is not None, ownership is
transferred to the new user.  If new_user is None, the policy is
determined by container properties.  Returns 1 if the object's
ownership changes.

Definition at line 255 of file memberdatacontainer.py.

00255                                                           :
        """
        Handle orphaned content.  If new_user is not None, ownership is
        transferred to the new user.  If new_user is None, the policy is
        determined by container properties.  Returns 1 if the object's
        ownership changes.
        """
        if new_user:
            changeOwnership(object, new_user)
            return 1
        else:
            if self.getOrphanedContentDestination() == 'delete':
                try:
                    parent = aq_parent(aq_inner(object))
                    if parent.isPrincipiaFolderish:
                        parent.manage_delObjects([object.getId()])
                except ConflictError:
                    raise
                except:
                    logException()
                return 0
            else:
                member = getToolByName(self,
                                       'portal_membership').getAuthenticatedMember()
                new_user = member.getUser()
                changeOwnership(object, new_user)
                return 1

    security.declarePublic('index_html')
    def index_html(self, REQUEST, RESPONSE):


Generated by  Doxygen 1.6.0   Back to index