reva icon indicating copy to clipboard operation
reva copied to clipboard

CERN: User defined notifications

Open labkode opened this issue 3 years ago • 7 comments

Ability to set a notification workflow for specific files/directories to trigger a mail to a specific e-group/person.

TODO(labkode): provide more info, Watcher in Dropbox

labkode avatar Jun 14 '22 20:06 labkode

Building blocks are in place:

  1. Reva emits all file related events and sends it to the nats service in ocis (on the edge branch)
  2. Nats is bundled in ocis but could also be used with a dedicated system. Nats is an industry standard and needs to be scaled accordingly
  3. We have an implementation in ocis for an email messaging service. That could also be a push-notifications service.

micbar avatar Jun 23 '22 16:06 micbar

For sending mails, a dedicated service will be created that reads from the event queue and dispatches them.

@micbar can you paste here an event payload that contains for example "new file created"? I expect the payload to contain a path.

labkode avatar Jul 01 '22 12:07 labkode

Can we have an example of a payload for a file created?

labkode avatar Jul 08 '22 11:07 labkode

https://github.com/owncloud/ocis/blob/84d9b390a61b99c49066dc096cbf7607501cc3ee/services/audit/pkg/types/conversion.go#L245

There are some examples

micbar avatar Jul 08 '22 12:07 micbar

We'll implement in master based on the work in edge. The big chunk of work is in the driver, so by respecting the interface of edge we'll be on the safe side when moving to edge.

labkode avatar Jul 15 '22 11:07 labkode

@labkode What can we do here? This seems to be CERN todo.

micbar avatar Nov 10 '22 14:11 micbar

To update from what was discussed on the workshop in Feb. 2023, the current implemented state is:

  • oCIS Edge comes with a notification service. Currently that sends emails on the following events:
    • Share created, share expiered
    • Space shared, space unshared, space membership expired

The email text can be customized for the site using templates as in https://github.com/owncloud/ocis/tree/master/services/notifications/pkg/email/templates - just copy the templates to a custom dir, change it and point the environment variable OCIS_EMAIL_TEMPLATE_PATH to it.

Additional CERN wishes:

  • Have a checkbox when creating a share to enable email notification to the receivers, default off.
  • Prevention that email is sent to too many people unintentionally ("Shared with group all"). This can be done
    • hardcoded: NEVER send emails to groups with more than 100 (or x) receivers
    • as an attribute of the group, ie. "never send email if shared with this group".

dragotin avatar Feb 22 '23 11:02 dragotin