Bug #19630

Notifications are being created for internal admins

Added by Marek Hulán about 1 year ago. Updated 7 days ago.

Status:Closed
Priority:Normal
Assignee:Marek Hulán
Category:Notifications
Target version:1.16.0
Difficulty: Team Backlog:
Triaged: Fixed in Releases:
Bugzilla link: Found in Releases:1.15.0
Pull request:https://github.com/theforeman/foreman/pull/4551, https://github.com/theforeman/foreman/pull/4601

Description

If notification audience is 'admin', the notification gets created for all admin accounts including internal anonymous and api admins. They won't be removed or read. The code that should be fixed is here https://github.com/theforeman/foreman/blob/1.15-stable/app/models/notification.rb#L47 it should probably add condition where.not(:login => [User::ANONYMOUS_ADMIN, User::ANONYMOUS_API_ADMIN])

EDIT: or simply add the scope "except_hidden"

Associated revisions

Revision 38b81aed
Added by Marek Hulán about 1 year ago

Fixes #19630 - ignore hidden admins

Revision e3ce3588
Added by Marek Hulán about 1 year ago

Fixes #19630 - ignore hidden admins

History

#1 Updated by Marek Hulán about 1 year ago

  • Description updated (diff)

#2 Updated by The Foreman Bot about 1 year ago

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

#3 Updated by Marek Hulán about 1 year ago

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

#4 Updated by Marek Hulán about 1 year ago

  • Legacy Backlogs Release (now unused) set to 240

#5 Updated by The Foreman Bot about 1 year ago

  • Pull request https://github.com/theforeman/foreman/pull/4601 added

Also available in: Atom PDF