add actor to rabbitmq message
This commit is contained in:
@@ -57,6 +57,7 @@ class ApplicationPartDelete(ApplicationBase):
|
||||
def do_DELETE(self, environ: types.WSGIEnviron, base_prefix: str,
|
||||
path: str, user: str, remote_host: str, remote_useragent: str) -> types.WSGIResponse:
|
||||
"""Manage DELETE request."""
|
||||
actor = user
|
||||
permissions_filter = None
|
||||
if self._sharing._enabled:
|
||||
# Sharing by token or map (if enabled)
|
||||
@@ -99,7 +100,8 @@ class ApplicationPartDelete(ApplicationBase):
|
||||
content_type=i.name,
|
||||
uid=i.uid,
|
||||
old_content=i.serialize(), # type: ignore
|
||||
new_content=None
|
||||
new_content=None,
|
||||
actor=actor,
|
||||
)
|
||||
)
|
||||
xml_answer = xml_delete(base_prefix, path, item)
|
||||
@@ -116,6 +118,7 @@ class ApplicationPartDelete(ApplicationBase):
|
||||
uid=item.uid,
|
||||
old_content=item.serialize(), # type: ignore
|
||||
new_content=None,
|
||||
actor=actor,
|
||||
)
|
||||
)
|
||||
xml_answer = xml_delete(
|
||||
|
||||
@@ -99,6 +99,7 @@ class ApplicationPartProppatch(ApplicationBase):
|
||||
def do_PROPPATCH(self, environ: types.WSGIEnviron, base_prefix: str,
|
||||
path: str, user: str, remote_host: str, remote_useragent: str) -> types.WSGIResponse:
|
||||
"""Manage PROPPATCH request."""
|
||||
actor = user
|
||||
permissions_filter = None
|
||||
share = None
|
||||
share_overlay = False
|
||||
@@ -220,7 +221,8 @@ class ApplicationPartProppatch(ApplicationBase):
|
||||
content_type=None, # Can't easily determine content type, won't trigger email hook
|
||||
uid=None,
|
||||
old_content=None,
|
||||
new_content=content
|
||||
new_content=content,
|
||||
actor=actor,
|
||||
)
|
||||
self._hook.notify(hook_notification_item)
|
||||
except ValueError as e:
|
||||
|
||||
@@ -181,6 +181,7 @@ class ApplicationPartPut(ApplicationBase):
|
||||
def do_PUT(self, environ: types.WSGIEnviron, base_prefix: str,
|
||||
path: str, user: str, remote_host: str, remote_useragent: str) -> types.WSGIResponse:
|
||||
"""Manage PUT request."""
|
||||
actor = user
|
||||
permissions_filter = None
|
||||
if self._sharing._enabled:
|
||||
# Sharing by token or map (if enabled)
|
||||
@@ -320,6 +321,7 @@ class ApplicationPartPut(ApplicationBase):
|
||||
uid=None,
|
||||
old_content=existing_item.serialize(),
|
||||
new_content=item.serialize(),
|
||||
actor=actor,
|
||||
)
|
||||
else: # We assume the item is new because it was not in the replaced_items
|
||||
hook_notification_item = HookNotificationItem(
|
||||
@@ -329,7 +331,8 @@ class ApplicationPartPut(ApplicationBase):
|
||||
content_type=item.name,
|
||||
uid=None,
|
||||
old_content=None,
|
||||
new_content=item.serialize()
|
||||
new_content=item.serialize(),
|
||||
actor=actor,
|
||||
)
|
||||
self._hook.notify(hook_notification_item)
|
||||
except ValueError as e:
|
||||
@@ -358,6 +361,7 @@ class ApplicationPartPut(ApplicationBase):
|
||||
uid=None,
|
||||
old_content=replaced_item.serialize() if replaced_item else None,
|
||||
new_content=prepared_item.serialize(),
|
||||
actor=actor,
|
||||
)
|
||||
self._hook.notify(hook_notification_item)
|
||||
except ValueError as e:
|
||||
|
||||
Reference in New Issue
Block a user