Skip to content

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

@prioux

Description

@prioux

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
    )

Metadata

Metadata

Assignees

No one assigned

    Labels

    AdminFeatures or bugs related to administrative featuresBugPriority: Normal

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions