foreman-tasks 8.3.1 → 8.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 93c84b1a1d6185d2831ad1c1c19968cf32b6e44afc494cc17fdca86e3ed20122
4
- data.tar.gz: 1bb7bfd14c8f17758bf0c787e0f5877b00d05bc8cae8851b217ae974bdd1376a
3
+ metadata.gz: 519140dcda3a20c8a566cca8192e395c85f44bfdadd87131870ceb1791149de4
4
+ data.tar.gz: 0fd591b273bf6467b4f29a0f5ee3605dd3fea6f2b6242ca7a6efca2cd33eedff
5
5
  SHA512:
6
- metadata.gz: c1d8fb885b03ff508cd96d1c4b97c00ce562d77df8a9cdd6a839b142a7db865996ce6141c793f039ad4b64cd9789e741f62a58d8ad2733648a29053fea6dd98c
7
- data.tar.gz: 36416c3c59724ce2a71e71ba68601f570c2da1f3608c5835c7cd8705ab425cacddcfdfd228be73834b15ebe15690ec8a2521baf9afb2430511e58dba7042316a
6
+ metadata.gz: 1bb4f81d52ff8f506e17c6bdf2a5f2e076235f80a8d7fd4b5bc570247bfd1ed7ff2bb8b55b16d27fa7b7174a49817d8729286b393849171babfd17a7769d450c
7
+ data.tar.gz: 373b9f29761b50181b27fff2e91ac2004a1a71138bd9e470c83020fc619572240b92f6a054b5bb5968520a5575ed33ebe1504f910b0d11026bd8e1409f270c2b
@@ -13,11 +13,13 @@ module ForemanTasks
13
13
  end
14
14
 
15
15
  def attach_task_mail_notifications
16
+ return if ::ForemanSeeder.is_seeding
17
+
16
18
  org_admin_role = Role.find_by(name: 'Organization admin')
17
- admin_role_ids = ([org_admin_role.id] + org_admin_role.cloned_role_ids)
18
- role_ids = roles.map(&:id)
19
+ admin_by_role = org_admin_role &&
20
+ (roles.map(&:id) & ([org_admin_role.id] + org_admin_role.cloned_role_ids)).any?
19
21
 
20
- return unless admin || (role_ids & admin_role_ids).any?
22
+ return unless admin || admin_by_role
21
23
 
22
24
  notification = MailNotification.find_by(name: 'long_running_tasks')
23
25
  return if notification.nil?
@@ -1,3 +1,3 @@
1
1
  module ForemanTasks
2
- VERSION = '8.3.1'.freeze
2
+ VERSION = '8.3.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman-tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.3.1
4
+ version: 8.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nečas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-20 00:00:00.000000000 Z
11
+ date: 2023-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dynflow