foreman-tasks 0.16.2 → 0.16.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/db/migrate/20180927120509_add_user_id.foreman_tasks.rb +4 -2
- data/lib/foreman_tasks/version.rb +1 -1
- data/package.json +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4810cb5f72cb95e222c01826c0849c45a8a098e1eb2fb5139d9bbc0abdb8823
|
4
|
+
data.tar.gz: 4f53e3c82ab8a1c6b0999cb4fd99652ce3f9984e7e6a8cf5b3ee7b91d59cd808
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f2dd82c93ef2a26e4f1a591eb3e7778d1aa33f9dbd5971995025f7dca355b9aba7e5f8d014dc7187b152649234685af1518a7078bd4eb68242bfa8cc3f0b7f9
|
7
|
+
data.tar.gz: 1278492ef015ddda14c6138655e4f2bcf50d7ce7e9fc3debeff2df5e0faf5906bf4a1159b99776370ef15a395273875a143a0068ba8b28153bf7dc4fc26107bc
|
@@ -5,8 +5,10 @@ class AddUserId < ActiveRecord::Migration[5.0]
|
|
5
5
|
return if User.unscoped.find_by(:login => User::ANONYMOUS_ADMIN).nil?
|
6
6
|
User.as_anonymous_admin do
|
7
7
|
user_locks.select(:resource_id).distinct.pluck(:resource_id).each do |owner_id|
|
8
|
-
|
9
|
-
|
8
|
+
if User.exists?(:id => owner_id)
|
9
|
+
tasks = ForemanTasks::Task.joins(:locks).where(:locks => user_locks.where(:resource_id => owner_id))
|
10
|
+
tasks.update_all(:user_id => owner_id)
|
11
|
+
end
|
10
12
|
user_locks.where(:resource_id => owner_id).delete_all
|
11
13
|
end
|
12
14
|
end
|
data/package.json
CHANGED
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: 0.16.
|
4
|
+
version: 0.16.3
|
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: 2019-
|
11
|
+
date: 2019-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foreman-tasks-core
|