Hi team,
I’d like to know more about Datagrok users and groups info accessed through Datagrok apps’ code. I found that the samples we have here don’t currently cover my case in interest.
Imagine an app has a built-in notification mechanism, where all the users of a certain group should receive a notification in their “Inboxes”, whenever any other user of this group publishes a new result item. The result item may be a simulation result, or a mathematical model, maybe ranked in some way so that the users are only notified of the best results.
What we likely need here is:
- Since a user is already running the app, we know this user is a member of a certain group, say “ChemModeller”. We should get all this group neighbours of this user in a list.
- Going through the list, we’d post notification objects to each of these users’ “Inboxes”, which are all stored in the corresponding user data storage. The notification objects may be stored in a public user data store and later pulled by apps’ instances ran by other users into their private user data stores.
- I may need to know if the current user is a part of some other group, say “ChemModelsSubscribers”, in order to decide if there’s the one who should emit notifications or not.
Thanks in advance for hints!