Beispiel #1
0
def fileAddedSubscriber(ob, event):
    """ when a file is added notify the object it is added to """
    ob = removeSecurityProxy(ob)
    obj = audit.getAuditableParent(ob)
    if obj:
        event.description = u"File %s %s added" % (ob.file_title, ob.file_name)
        notify(audit.objectAttachment(obj, event))
Beispiel #2
0
def fileEditedSubscriber(ob, event):
    """ when a file is edited notify the parent object """
    ob = removeSecurityProxy(ob)
    obj = audit.getAuditableParent(ob)
    if obj:
        event.description = u"File %s %s edited" % (ob.file_title, ob.file_name)
        notify(audit.objectAttachment(obj, event))