foreman-tasks 8.1.3 → 8.1.4

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: 6b47d3165d26d95f9799243481ff75c14aaa59ec3966edcf8afe95ee1da77a97
4
- data.tar.gz: 2b0eb29411d81b496169b970f0edb93abda50f6a109ee13d21830f918e52e29f
3
+ metadata.gz: 85ab1c464de6111266303ebd6751df29275e6f61aeb1e24bb083a22c55fa99b5
4
+ data.tar.gz: 1f8007921fd39ca31f7da3c49fb8e00d98ab86d073714892c033406b4ce39cd6
5
5
  SHA512:
6
- metadata.gz: 686ecd66afcaab661bb7916746547dad1a8b33dc9087a2dfd874a87e87d0d426b4fe05f9807337be8fcd13a2861a02dc98c4ae03326df482a7970eed89745fa9
7
- data.tar.gz: 4424d6de0469d10129d6c53d5abc190307e497524b6a80a4349be630a383ce1c4fcde172241c64567ea843ba5ef0f804e3c93d7e54ff5f36dd350c12a3ba289a
6
+ metadata.gz: 7e238da6f91fe31aae02c11a35297c9ee40c50919755e20f83ba543314fc98649e7ccff7c9f18fe9d073930d5fcdfad20ed11e242e6a2e9c7916d70e7dbe1f1c
7
+ data.tar.gz: 85967d7042d506f247025c2cccbb65bcad460a58db64b19d35fa7db25e3643282a9996d4c836268fdd0e267acdfb8c88fc35c51461ff81a1c7de8b21fbc0ab44
@@ -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.1.3'.freeze
2
+ VERSION = '8.1.4'.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.1.3
4
+ version: 8.1.4
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