Project

General

Profile

Actions

Bug #20017

closed

Mail notifications not being sent

Added by Marek Hulán over 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
E-Mail
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

rake reports:daily task fails with following trace

rake aborted!
NoMethodError: undefined method `mail_enabled?' for nil:NilClass
/home/ares/Projekty/Zdrojaky/foreman/app/models/user_mail_notification.rb:10:in `deliver'
/home/ares/Projekty/Zdrojaky/foreman/lib/tasks/reports.rake:97:in `block in process_notifications'
/home/ares/Projekty/Zdrojaky/foreman/lib/tasks/reports.rake:96:in `process_notifications'
/home/ares/Projekty/Zdrojaky/foreman/lib/tasks/reports.rake:102:in `block (2 levels) in <top (required)>'
/home/ares/.rbenv/versions/2.2.2/bin/bundle:23:in `load'
/home/ares/.rbenv/versions/2.2.2/bin/bundle:23:in `<main>'
Tasks: TOP => reports:daily
(See full trace by running task with --trace)

it's obviously caused by taxonomies, the rake task is not running under admin user so mail notification user can not be found if the user is in any context. I think that's a candidate for 1.15.z since it's a regression caused by #16982


Related issues 2 (1 open1 closed)

Related to Foreman - Bug #16982: CVE-2016-7078 - User with no organizations or locations can see all resourcesClosedDaniel Lobato Garcia10/18/2016Actions
Related to Foreman - Tracker #10022: Taxonomies related issuesNew04/05/2015

Actions
Actions #1

Updated by Marek Hulán over 7 years ago

  • Related to Bug #16982: CVE-2016-7078 - User with no organizations or locations can see all resources added
Actions #2

Updated by Marek Hulán over 7 years ago

Actions #3

Updated by The Foreman Bot over 7 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Marek Hulán
  • Pull request https://github.com/theforeman/foreman/pull/4589 added
Actions #4

Updated by Marek Hulán over 7 years ago

  • Translation missing: en.field_release set to 266

I propose this for 1.15.2, there's no github label yet so just setting here for now.

Actions #5

Updated by Marek Hulán over 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #6

Updated by Marek Hulán over 7 years ago

  • Bugzilla link set to 1473909
Actions

Also available in: Atom PDF