def getPreferredRecycleBin(object,global_recycle_bin=True):
    from ubify.recyclebin.utils import getGlobalRecycleBin,getMemberRecycleBin
    portal = object.portal_url.getPortalObject()
    
    members = portal.Members
    
    parentslist = object.aq_chain
    parentslist.reverse()
    if parentslist.__contains__(members) and object <> members:
        global_recycle_bin = False
        
    parentslist.reverse()
    # check whether /Members is in the path if not then use global recycle bin else get Member specific recycle bin object
    if global_recycle_bin == True:
        return getGlobalRecycleBin(portal)
    else:
        return None
Exemple #2
0
def getPreferredRecycleBin(object, global_recycle_bin=True):
    from ubify.recyclebin.utils import getGlobalRecycleBin, getMemberRecycleBin
    portal = object.portal_url.getPortalObject()

    members = portal.Members

    parentslist = object.aq_chain
    parentslist.reverse()
    if parentslist.__contains__(members) and object <> members:
        global_recycle_bin = False

    parentslist.reverse()
    # check whether /Members is in the path if not then use global recycle bin else get Member specific recycle bin object
    if global_recycle_bin == True:
        return getGlobalRecycleBin(portal)
    else:
        return None
def setRecycleBin(portal,logger):
    from ubify.recyclebin.utils import getGlobalRecycleBin
    getGlobalRecycleBin(portal)
    logger.info("Created Global Recycle Bin for cyn.in site.")
Exemple #4
0
def setRecycleBin(portal, logger):
    from ubify.recyclebin.utils import getGlobalRecycleBin
    getGlobalRecycleBin(portal)
    logger.info("Created Global Recycle Bin for cyn.in site.")