decidim-cleaner 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7667514845e0dddc19580aa0762d5218b93e1a24b75e5053856c8d1b7d748e0e
4
- data.tar.gz: e39fbda595e2082802936da1a446b6e9a943d6dbb3c611dd2d67539c2a72e700
3
+ metadata.gz: a54a64e4729007defe0803975b74c3e2d5d6fbcc66d30fc33c4534f79a496205
4
+ data.tar.gz: b3c8baca2de78e8536509be9d5ea87a96521c8b9376da7f1dd6cef97f211c240
5
5
  SHA512:
6
- metadata.gz: 334ed4a155cbafd585244e53d6e080145c046894411ef9bec85d9fab00d9d9e89f8a7fc75b30c8eeef761a913183a3474543108b1e5ff6bbb624ab9a0dfbdad0
7
- data.tar.gz: 76f39a3e96f7a152efc8420c2b352825f3d544826a7dac395f1f7d2025e82b3e81412b6b6144d93342f0c799c825a1f52c89548761362a45aa2306e511e56ca9
6
+ metadata.gz: 9c69c28fcc394795f6fbef9fd340cc35e4068e25983ba321d262416f8406c1b1b0769fc469fd9ab404203f963b10c8da8c8367f266c535fda771087575a2cddd
7
+ data.tar.gz: 2d7e6f95b56b232137ae8586d4562e59689f54b301360e3a899c5c25e3de237357c5562b442b96f09c018120d52ec47a717ec36b12aa61f51f713f78da1c3c3f
data/README.md CHANGED
@@ -66,7 +66,7 @@ You can then add to your 'config/sidekiq.yml' file:
66
66
  ## Available tasks
67
67
 
68
68
  - [ ] **Delete inactive users**
69
- - Cron task that checks for user accounts where `last_sign_in_at` is superior to environment variable `CLEANER_USER_INACTIVITY_LIMIT`. If true, deletes inactive user from the database.
69
+ - Cron task that checks for user accounts where `current_sign_in_at` is superior to environment variable `CLEANER_USER_INACTIVITY_LIMIT`. If true, deletes inactive user from the database.
70
70
 
71
71
  - [ ] **Delete old admin logs**
72
72
  - Cron task that checks for admin logs where `created_at` is anterior to the time you configured in the back office. If true, deletes old admin logs from the database.
@@ -12,7 +12,8 @@ module Decidim
12
12
  send_warning(Decidim::User.where(organization: organization)
13
13
  .not_deleted
14
14
  .where.not(email: "")
15
- .where("last_sign_in_at < ?", email_inactive_before_date(organization)))
15
+ .where("current_sign_in_at < ?", email_inactive_before_date(organization)))
16
+
16
17
  delete_user_and_send_email(Decidim::User.where(organization: organization)
17
18
  .not_deleted
18
19
  .where.not(email: "")
@@ -31,7 +32,7 @@ module Decidim
31
32
 
32
33
  def delete_user_and_send_email(users)
33
34
  users.find_each do |user|
34
- if user.last_sign_in_at > user.warning_date
35
+ if user.current_sign_in_at > user.warning_date
35
36
  user.update!(warning_date: nil)
36
37
  Rails.logger.info "User with id #{user.id} has logged in again, warning date reset"
37
38
  next
@@ -5,7 +5,7 @@ module Decidim
5
5
  # This holds the decidim-meetings version.
6
6
  module Cleaner
7
7
  def self.version
8
- "2.1.0"
8
+ "2.1.1"
9
9
  end
10
10
 
11
11
  def self.compatible_decidim_version
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: 2.1.0
4
+ version: 2.1.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-04-19 00:00:00.000000000 Z
11
+ date: 2023-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: decidim-core