I’m working on a Node-Red flow to let the vet fill out the medical data, and store it in medical logs.
I want to email the vet a reciept of the log. (So he can register in his system later)
Insted of managing vets and email addresses in Node-Red, I figured a possible way could be adding them as users in FarmOS.
Anything to be avare of/best practice with this approach?
Would be nice if the vet could log in to FarmOS and see nothing except his own medical logs
If that’s not possible, I only need the vet users for getting their email via the API.
User access control would be a nice feature too, could be useful for the Plans module too, it would be nice to have some private plans and associated logs on the farm too. I once made the mistake of sharing some planed improvements with a health and safety inspector who thought they were should a good idea that they gave me a deadline to implement!
Just want to throw this in too: on a recent dev call we were brainstorming the idea of “sharing” records with certain users (or groups of users), similar to the way in which you can “share” files with other users/groups in NextCloud/Google Drive/etc. This would be a very useful and flexible way to selectively share records. Not sure if there are any existing Drupal modules that support this, but it probably wouldn’t be too hard to sketch up requirements for a farmOS-specific implementation of the idea too.
Would be nice if the vet could log in to FarmOS and see nothing except his own medical logs
farmOS entity types (assets, logs, and plans) do already have granular permissions for “view/edit/delete own asset/log/plan”, but in order to do what you want you would need to create a custom role. The “default” roles that farmOS ships with (Manager/Worker/Viewer) allows access to everything. Roles can only be customized if you’re self-hosting.
As an interim solution, you could build a UI with Node-Red to select records to retrieve via API and format a CSV or even Excel file to your liking and forward to contacts from an external address book.