src/zope/dublincore/creatorannotator.py
def CreatorAnnotator(object, event=None):
    """Update Dublin-Core creator property"""
    if event is None:
        # annotator was only called the event as only argument
        object = object.object
    dc = IZopeDublinCore(object, None)
    # Principals that can create objects do not necessarily have
    # 'zope.app.dublincore.change' permission.
    # https://bugs.launchpad.net/zope3/+bug/98124
    dc = removeSecurityProxy(dc)
    if dc is None:
        return

    # Try to find a principal for that one. If there
    # is no principal then we don't touch the list
    # of creators.
    interaction = queryInteraction()
    if interaction is not None:
        for participation in interaction.participations:
            if participation.principal is None:
                continue
            principalid = participation.principal.id
            if principalid not in dc.creators:
                dc.creators = dc.creators + (unicode(principalid), )
Update Dublin-Core creator property
Update Dublin-Core creator property
Update Dublin - Core creator property
def CreatorAnnotator(object, event=None):
    if event is None:
        object = object.object
    dc = IZopeDublinCore(object, None)
    dc = removeSecurityProxy(dc)
    if dc is None:
        return
    interaction = queryInteraction()
    if interaction is not None:
        for participation in interaction.participations:
            if participation.principal is None:
                continue
            principalid = participation.principal.id
            if principalid not in dc.creators:
                dc.creators = dc.creators + (unicode(principalid), )
def CreatorAnnotator ( object , event = None ) : if event is None : object = object . object dc = IZopeDublinCore ( object , None ) dc = removeSecurityProxy ( dc ) if dc is None : return interaction = queryInteraction ( ) if interaction is not None : for participation in interaction . participations : if participation . principal is None : continue principalid = participation . principal . id if principalid not in dc . creators : dc . creators = dc . creators + ( unicode ( principalid ) , )
Update Dublin-Core creator property
Update Dublin - Core creator property
"""Update Dublin-Core creator property""" # annotator was only called the event as only argument # Principals that can create objects do not necessarily have # 'zope.app.dublincore.change' permission. # https://bugs.launchpad.net/zope3/+bug/98124 # Try to find a principal for that one. If there # is no principal then we don't touch the list # of creators.
object
event