egov_utils 1.4.1 → 1.4.3
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: f59b9c738bfe2ebd79c6530995f7ce49fd478365245c04725cb9e98f056da46a
|
4
|
+
data.tar.gz: d04950c0c7be271dde65c647d23ca6b3e3677186c2c7da119270bbb9249eaf13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54b882c6fdc2fa34eca1b363ef3c557cea0b7d8c0d40d801c0565cdaee3e08278f700f4d01204bb46b7e7ec783a32eb0880f246eec68e9d7f0cb68bb4d718dfa
|
7
|
+
data.tar.gz: b2c622fba5f4800cab1f77780a07ed211a7da37c3927817ed6cac4d8520267b347d55c751fa83d5c9731d791c9cea8b9c3f9dc807096fa22cb4c8360f2e630f1
|
@@ -19,7 +19,7 @@ module EgovUtils
|
|
19
19
|
@token = @user.generate_reset_password_token
|
20
20
|
EgovUtils::UserMailer.with(host: mailer_host).password_reset(@user, @token).deliver_later if @user.save
|
21
21
|
flash[:notice] = t('notice_reset_email_sent')
|
22
|
-
elsif !@user.password_change_possible?
|
22
|
+
elsif @user && !@user.password_change_possible?
|
23
23
|
flash[:error] = t('notice_pw_reset_not_possible')
|
24
24
|
end
|
25
25
|
redirect_to egov_utils.reset_passwords_path
|
@@ -3,7 +3,8 @@ module EgovUtils
|
|
3
3
|
def call
|
4
4
|
EgovUtils::User
|
5
5
|
.where.not(days_before_archive: nil, active: true).each do |user|
|
6
|
-
|
6
|
+
date_to_compare = user.last_login_at || user.created_at
|
7
|
+
next if date_to_compare > Time.now - user.days_before_archive.days
|
7
8
|
|
8
9
|
user.destroy
|
9
10
|
end
|
data/lib/egov_utils/settings.rb
CHANGED
@@ -35,6 +35,9 @@ module EgovUtils
|
|
35
35
|
Settings['redmine'] ||= Settingslogic.new({})
|
36
36
|
Settings['redmine']['enabled'] ||= false
|
37
37
|
|
38
|
-
Settings
|
38
|
+
if !Settings.key?('mock_resources')
|
39
|
+
Settings['mock_resources'] = !Rails.env.production?
|
40
|
+
end
|
39
41
|
|
42
|
+
Settings['mock_resources'] = true if Rails.env.test?
|
40
43
|
end
|
data/lib/egov_utils/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: egov_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ondřej Ezr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -820,7 +820,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
820
820
|
- !ruby/object:Gem::Version
|
821
821
|
version: '0'
|
822
822
|
requirements: []
|
823
|
-
rubygems_version: 3.5.
|
823
|
+
rubygems_version: 3.5.3
|
824
824
|
signing_key:
|
825
825
|
specification_version: 4
|
826
826
|
summary: The eGoverment utilities is set of functionalities to support basic eGoverment
|