egov_utils 0.2.1 → 0.2.2

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: 33db3e5ccbe46317e0a1e9803ab4c5eb8ef883639afbba9ace99a51f50c503b4
4
- data.tar.gz: a076d1f3de491372de23ed2bcbfc7625a968ec814ece0a6bdecbd863bff70959
3
+ metadata.gz: ba3f5380fc306ec7b4c507ade387e837754e5e7bd1eaf728e06a4c811b3f7bb3
4
+ data.tar.gz: 384d20a4b394d508f88cfc043a2a5764931fc38f84cfd3d4c188cf71d9df52d5
5
5
  SHA512:
6
- metadata.gz: 8ebe29ad9fa58d6f45c3334e0abfaf6dffabe4f16da20e13f33b3d26130b783db92c9700923b83b55ad2a772fd640a2b544514b9184b7e4df6ba80d0fa6f0697
7
- data.tar.gz: cfd919066d507e6506021b072bc91fa8a32040ea3402c7985c4acd1e4a3c38c20bc86e7ad7849b1eeceb1836dbcc5b017929bb1497a534b02234f6e672ac5acb
6
+ metadata.gz: 931c4bc8d6ff1450ed72e83f656da51ca77d49ef055c4695c8aa3f2a8a9fe4e1f6151328ca92ab4ba4b7f4c0e750f184e55f169ee2202be3e003b3d5f69f6ba1
7
+ data.tar.gz: bcb8838c932c08ce443df2608957f71b49f32548c7c67cc5a3c4a5d870faff962bb52805fc5bc039dda1107b20fd5e195c84e1b5b63e9af7ff2c59c5771b5ca9
@@ -29,7 +29,10 @@ module EgovUtils
29
29
  UserMailer.confirmation_email(@user).deliver_later
30
30
  flash[:notice] = t('notice_signeup_with_mail')
31
31
  else
32
- UserMailer.account_information(@user, @user.password).deliver_later if @user.auth_source.nil?
32
+ if @user.auth_source.nil?
33
+ @user.update(active: true)
34
+ UserMailer.account_information(@user, @user.password).deliver_later
35
+ end
33
36
  flash[:notice] = t('activerecord.successful.messages.created', model: User.model_name.human)
34
37
  end
35
38
  format.html{ redirect_to main_app.root_path }
@@ -139,7 +139,7 @@ module EgovUtils
139
139
  end
140
140
 
141
141
  def ldap_dn
142
- @ldap_dn ||= auth_source.send(:get_user_dn, login)[:dn]
142
+ @ldap_dn ||= ( dn = auth_source.send(:get_user_dn, login) ) && dn[:dn]
143
143
  end
144
144
 
145
145
  def ldap_groups
@@ -1,3 +1,3 @@
1
1
  module EgovUtils
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
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: 0.2.1
4
+ version: 0.2.2
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: 2018-01-29 00:00:00.000000000 Z
11
+ date: 2018-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails