decidim-cleaner 1.0.0 → 1.0.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9fd35840bd986218c10726232aa523b811331ec05cb78d6ae52b0352e434862
|
4
|
+
data.tar.gz: 2edf1e583c38516e4d7eefd51f4116cb883e4f823643c605df4f40ae4718684f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0c59579a5fe21080c697d6553b2983b21f242d62687c7fb7e700e86c5a01617762cdd8019a0b9258719d1534f5be29a00faa0580208ae92c31dc6fedb6d536f
|
7
|
+
data.tar.gz: aca024679460c2a7fd0896e426c3b2de5f6aee923595b572bdfae1f2cb419090ae5a5dba6d898d4e38a744b67a0caff17b2ed2eb583bd883156cad4c063df912
|
@@ -9,7 +9,9 @@ module Decidim
|
|
9
9
|
Decidim::Organization.find_each do |organization|
|
10
10
|
next unless organization.delete_admin_logs?
|
11
11
|
|
12
|
-
Decidim::ActionLog.where(organization:
|
12
|
+
Decidim::ActionLog.where(organization: organization)
|
13
|
+
.where("created_at < ?", Time.zone.now - (organization.delete_admin_logs_after || 365).days)
|
14
|
+
.delete_all
|
13
15
|
end
|
14
16
|
end
|
15
17
|
end
|
@@ -9,10 +9,11 @@ module Decidim
|
|
9
9
|
Decidim::Organization.find_each do |organization|
|
10
10
|
next unless organization.delete_inactive_users?
|
11
11
|
|
12
|
-
send_warning(Decidim::User.where(organization:)
|
12
|
+
send_warning(Decidim::User.where(organization: organization)
|
13
13
|
.where("last_sign_in_at < ?", Time.zone.now - (organization.delete_inactive_users_email_after || 365).days)
|
14
14
|
.where("last_sign_in_at > ?", Time.zone.now - (organization.delete_inactive_users_email_after || 365).days - 1.day))
|
15
|
-
delete_user_and_send_email(Decidim::User.where(organization:
|
15
|
+
delete_user_and_send_email(Decidim::User.where(organization: organization)
|
16
|
+
.where("last_sign_in_at < ?", Time.zone.now - (organization.delete_inactive_users_after || 390).days))
|
16
17
|
end
|
17
18
|
end
|
18
19
|
|
@@ -13,7 +13,7 @@ module Decidim
|
|
13
13
|
"decidim.cleaner.inactive_users_mailer.warning_inactive.subject",
|
14
14
|
organization_name: @organization.name
|
15
15
|
)
|
16
|
-
mail(to: user.email, subject:)
|
16
|
+
mail(to: user.email, subject: subject)
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
@@ -25,7 +25,7 @@ module Decidim
|
|
25
25
|
"decidim.cleaner.inactive_users_mailer.warning_deletion.subject",
|
26
26
|
organization_name: @organization.name
|
27
27
|
)
|
28
|
-
mail(to: user.email, subject:)
|
28
|
+
mail(to: user.email, subject: subject)
|
29
29
|
end
|
30
30
|
end
|
31
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decidim-cleaner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Quentinchampenois
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: decidim-core
|
@@ -76,7 +76,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
76
76
|
requirements:
|
77
77
|
- - ">="
|
78
78
|
- !ruby/object:Gem::Version
|
79
|
-
version:
|
79
|
+
version: 2.7.5
|
80
80
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
82
|
- - ">="
|