Internal messages to admin users aren't set if the account is locked

Aperta
#1,622 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
50/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
rails, ruby
Ambito
backend

Direzione di ricerca

Start with the example call to Message.send_message(User.admin, ...) in bourreau_system_checks.rb around line 307, then read how send_message filters locked users and what the :include_locked_users => true option changes. Search the codebase for other send_message calls that target User.admin and add the option where it is missing. Done when every admin-directed message is still created while the admin account is locked, and the change is confirmed with a test or a manual check.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Admin Bug Priority: Normal

We usually keep the admin account locked and nobody directly uses it.

But some internal code sometimes generate internal Message objects for the admin account. The message method Message.send_message normally ignores creating a message object for an account that is locked. There is an option :include_locked_users => true to allow this though.

So this issue is about finding places in the code base where we send a message to the admin user and making sure the option is turned on. Example, in bourreau_system_checks.rb line 307:

    Message.send_message(User.admin,
      :type          => :system,
      :header        => "Spurious task work directories found on '#{myself.name}'",
      :description   => "Some spurious task work directories were found.\n" +
                        "These correspond to tasks that no longer exist in the database.",
      :variable_text => "Bash commands to clean them:\n" +
                        "cd #{gridshare_dir.bash_escape}\n" +
                        "#{message}\n",
      :critical      => true,
      :send_email    => false
    )
Lingua principale
Ruby
Stelle
82
Fork
64
Merge medio
6g 13h
PR unite (30g)
36

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di aces/cbrain

Tutte le issue di aces/cbrain

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.