[ckan-dev] Function called on resource update
lucia.espona at wsl.ch
lucia.espona at wsl.ch
Thu Apr 27 13:33:26 UTC 2017
Dear all
I would like to know how to define a function that will be called when a resource is updated. The function will need to know which information (field, new value, old value) was changed.
What would be the best way to do this? I am using scheming and was thinking of using a validator.
Here is the context: in my ckanext-restricted extension, I would like that the user is notified by mail when he/she is granted access to access a restricted resource. This happens when the owner updates a field called "allowed_users" in the resource metadata. It is important that only the new added users get a mail.
Any help will be appreciated :)
Best regards,
Lucia
_________________________________________________________
Dr. Lucia Espona Pernas
Swiss Federal Institute for Forest, Snow and Landscape Research WSL
Hauptgebäaude Labortrakt (HL C21)
Zürcherstrasse 111
8903 Birmensdorf
Switzerland
+41 44 739 28 71 phone direct
+41 44 739 21 11 reception
www.wsl.ch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20170427/119919de/attachment-0002.html>
More information about the ckan-dev
mailing list