#7013 (Site admins get spammed with useless notifications)

by Luc Saffre · in Developers · assigned to Luc Saffre

Résumé

Right now every change on a user is sent to every site admin, but not all admins want to get these mails. But they do want to get calendar reminder emails.

On the other hand, some site admins even want to get notiffied when a user defines or verifies their password.

Concepts sous-jacents

Commentaires

  • 1 mois ago by Luc Saffre about #7013 (Site admins get spammed with useless notifications) : After a break of 10 minutes, PyPI was back. But then I made 2 more releases and it was broken again.
  • 1 mois ago by Luc Saffre about #7013 (Site admins get spammed with useless notifications) : I started to upgrade the stewards site, but PyPI went down while i was running pull.sh.
  • 1 mois ago by Luc Saffre about #7013 (Site admins get spammed with useless notifications) : I wrote demo data and a tested introduction for the new feature: dev.lino-framework.org/projects/noi2.html#dg-intro-with-options
  • 1 mois ago by Luc Saffre about #7013 (Site admins get spammed with useless notifications) : todo: A newly created user doesn't yet have Option records. And we do not always want to wait until checkdata has run. I could say quickfix_checkdata_label = _("Fill missing options") on the model. But that' still suboptimal since somebody needs to click that button.

  • 1 mois ago by Luc Saffre about #7013 (Site admins get spammed with useless notifications) : todo: Write the data checker. How to edit the MyOptions panel.
  • 1 mois ago by Luc Saffre about #7013 (Site admins get spammed with useless notifications) : So I plan to add a model notify.Option with three fields (user, message_type, selected). A data checker should add missing options.
  • 1 mois, 1 semaine ago by Luc Saffre about #7013 (Site admins get spammed with useless notifications) : But if we can make the dispatching async, then we don't need to defer the recipients resolving and translation, then we can as well leave these things as they are.
  • 1 mois, 1 semaine ago by Luc Saffre about #7013 (Site admins get spammed with useless notifications) : In a first step we could send them synchronously, which is what we are doing anyway already now except for the MailModes.directly.
  • 1 mois, 1 semaine ago by Luc Saffre about #7013 (Site admins get spammed with useless notifications) : We differentiate the "direct" methods for sending a notification (matrix, channels, webpush, FCM, and potentially MailModes.direct) from "summary" methods. The former should actually be sent by the process who created the notification, but asynchronously. Sending them from linod would mean that they...
  • 1 mois, 1 semaine ago by Luc Saffre about #7013 (Site admins get spammed with useless notifications) : I started the changes for the new approach where the list of recipients gets resolved only later.
    A first side effect is that Lino will no longer support a get_notifying_action_url() method. This is currently used only in Pronto and I have the feeling that we will find another way to achieve this re...
  • 1 mois, 1 semaine ago by Luc Saffre about #7013 (Site admins get spammed with useless notifications) : I will now push my changes with the work of several days. This is just preparation work, the original issue is not yet done. I have an exception "Action spec 'uploads.MyUploads.insert' returned invalid object None" during pm prep in pronto1 for which I don't see the explanation. I'm probably the cul...
  • 1 mois, 1 semaine ago by Luc Saffre about #7013 (Site admins get spammed with useless notifications) : The untranslated templates for subject and body would be stored in the database, and the owner of the notification would have a method get_notify_context(), which would be called for each recipient and in their language.
  • 1 mois, 1 semaine ago by Luc Saffre about #7013 (Site admins get spammed with useless notifications) : I'm thinking about yet another possibility: make the notify plugin more like journald, where a notification message gets stored in the database without resolving it to its observers). Making the list of obervers and then sending an email or a push message to each of them can be done later. Maybe the...
  • 1 mois, 1 semaine ago by Luc Saffre in reply to Luc Saffre about #7013 (Site admins get spammed with useless notifications) : I renamed the testcase_setup signal to reload_lino. I started to accept that we need a new database model to store what types of notifications a user chooses to receive. Oops, in notify we do already a have a model called Subscribe. It is used for storing push subscriptions when use_push_api is True...
  • 1 mois, 1 semaine ago by Luc Saffre about #7013 (Site admins get spammed with useless notifications) (1 reply) : No, I don't like the solution. We cannot make a system where all users of a given type get notified for every change in the users table. We want a way for the users to say whether they want those notifications. Either a new model where they subscribe to certain message types, or use the user groups....
  • 1 mois, 1 semaine ago by Luc Saffre about #7013 (Site admins get spammed with useless notifications) : I added a new Site attribute notify_each_action_request, which is similar to log_each_action_request, but instead of logging every request it sends a notification message to every site admin. I'm not sure whether I like this solution.
  • 1 mois, 1 semaine ago by Luc Saffre about #7013 (Site admins get spammed with useless notifications) : I think I will remove the "broadcast notification" feature. And also the "Welcome on board, {}." notification generated by the demo2 fixture of the notify plugin is unrealistic.
  • 1 mois, 1 semaine ago by Luc Saffre about #7013 (Site admins get spammed with useless notifications) : Seems that I will rename the methods and emit_notification() create_message()... still meditating...
  • 1 mois, 2 semaines ago by Luc Saffre about #7013 (Site admins get spammed with useless notifications) : No, setting readonly to False is not enough, and using this attribute would interfere with its actual meaning (which is "this action modifies the current row"). Right now I'm experimenting with a new action attribute "notify_admins" or a new action method get_after_run_message().
  • 1 mois, 2 semaines ago by Luc Saffre about #7013 (Site admins get spammed with useless notifications) : The VerifyUser action now has readonly = False, and I plan to review the Site.log_each_action_request action. Rather than just logging it, it would notify site admins. But not all site admins want a notification for each write action to the database, and not for every database model. There needs to ...
  • 1 mois, 2 semaines ago by Luc Saffre about #7013 (Site admins get spammed with useless notifications) : Created new Ticket #7013 (Notify site admins when a user defines or verifies their password).