egov_utils 1.4.2 → 1.4.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: c706bd457517726ec2f3e6aadfce8541fa03218e62eef83a41107dc348b86665
4
- data.tar.gz: 2c37f8daad4ab35dbba9b0b4780d3a5faa243715bc5107e9ef0d039dea473ce0
3
+ metadata.gz: a052f6930056ce190d309b98e658f4bc2dbca18786140b8ca3582106b1c9a924
4
+ data.tar.gz: 89b57ca5ff1d3749911521dc561a9f048af35a29521eb9852da4748e12ce937d
5
5
  SHA512:
6
- metadata.gz: 90ea9f93593b1614d3c57da82a79edbfc07ebd8afb449e39b0bf2e0d9f37485712d93a7ca6767bb42cc101706a3f4eab0238435a5986b81fbd0186799a10e423
7
- data.tar.gz: c823c3827673872f8a108b30b6ebefe3816b7a0e996b87f80eb344c5ae7bbf19b472134f3a833f2444d501277df4671980a56ea3b74388336a893bbc63a703c5
6
+ metadata.gz: 69030f399b8efd00aff8624ba7da682aa37653db0291aff53dd86b775789e264715ff439328f8175a59d04941301625d75bf9e848e284be3e98797e396f6c361
7
+ data.tar.gz: ae7e31c7fe5f2512b5bcc230448f12618b51281bc139770eff5538a28c4dfc5ae6b86d21be56b0f5261e72dc61b697687e43fb08a6d718482281eb508e1c13b0
@@ -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
- next if user.last_login_at > Time.now - user.days_before_archive.days
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
@@ -3,6 +3,7 @@
3
3
  = bootstrap_form_tag(url: egov_utils.users_path, method: :get, layout: :inline) do |f|
4
4
  .form-group
5
5
  = f.text_field :search, value: params[:search], label: false, placeholder: t('label_search'), skip_label: true
6
+ = f.hidden_field :default_scope, value: params[:default_scope]
6
7
  = f.submit 'Vyhledat', class: 'btn btn-primary btn-sm'
7
8
 
8
9
  %table.table.table-striped
@@ -1,3 +1,3 @@
1
1
  module EgovUtils
2
- VERSION = '1.4.2'
2
+ VERSION = '1.4.4'
3
3
  end
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.2
4
+ version: 1.4.4
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-08 00:00:00.000000000 Z
11
+ date: 2024-07-23 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.0.dev
823
+ rubygems_version: 3.5.11
824
824
  signing_key:
825
825
  specification_version: 4
826
826
  summary: The eGoverment utilities is set of functionalities to support basic eGoverment