Get last document updater


#1

Hi all,

while using sync gateway’s webhooks or changes feed, is there a way to know which user updated a document?

Thanks.

Paolo


#2

No - Sync Gateway doesn’t store metadata on which user created a given revision.


#3

You could add a modified_by field to the document and use requireUser() in the sync function to validate it.


#4

Thanks Paul,

I have update_stamp & update_user properties in my documents that my business logic use for keep trace of last user’s data modification. I was trying to understand if they are redundant information or not.

Paolo