thecore_auth_commons 3.5.12 → 3.5.13
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 +4 -4
- data/app/services/ldap/authenticator.rb +2 -2
- data/lib/thecore_auth_commons/version.rb +1 -1
- data/lib/thecore_auth_commons.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9adb75c5f18c265f09ea114168ffef23573cb3331f0f9a2ed9b7ab87d46f3813
|
|
4
|
+
data.tar.gz: f25d391c389a2e521bf7e86314a68837e1ce3b92c028cec9a19492cb232e7160
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 569320497ba05528a7a972866aa3e2cb742139a331f25b66466786bb55fc8fe33933388fadce770b80d696c9eeb10fd5a63a811abda8d2122b32dc5830f50583
|
|
7
|
+
data.tar.gz: 730e678b864fe11d7b6dd40ab3a43a7dd44f591b3a34289d315fa29630eb6f0abab4d858195efd33d41bd7f3aeffac358e0f822f295d0a05e19d593a7df25897
|
|
@@ -57,10 +57,10 @@ module Ldap
|
|
|
57
57
|
LdapServer.all.each do |server|
|
|
58
58
|
entry = auth_on_single_server(server)
|
|
59
59
|
if entry
|
|
60
|
-
Rails.logger.info("Authentication: LDAP authentication succeeded for #{email} on server #{server.
|
|
60
|
+
Rails.logger.info("Authentication: LDAP authentication succeeded for #{email} on server #{server.host}")
|
|
61
61
|
return find_or_create_user(entry, server)
|
|
62
62
|
else
|
|
63
|
-
Rails.logger.info("Authentication: LDAP authentication failed for #{email} on server #{server.
|
|
63
|
+
Rails.logger.info("Authentication: LDAP authentication failed for #{email} on server #{server.host}")
|
|
64
64
|
end
|
|
65
65
|
end
|
|
66
66
|
|
data/lib/thecore_auth_commons.rb
CHANGED
|
@@ -105,7 +105,7 @@ module ThecoreAuthCommons
|
|
|
105
105
|
user.roles << role unless user.roles.include?(role)
|
|
106
106
|
end
|
|
107
107
|
|
|
108
|
-
user.admin = is_admin if user.respond_to?(:admin)
|
|
108
|
+
user.admin = is_admin if user.respond_to?(:admin) && !user.admin # Se l'utente è già admin non revocargli l'admin, altrimenti se è nuovo o non era admin assegnagli l'admin se è presente nei gruppi admin
|
|
109
109
|
# Se l'utente è nuovo o ha cambiato qualcosa, salvalo
|
|
110
110
|
puts "Cannot save user #{email} with errors: #{user.errors.full_messages.join(", ")}" unless user.save(:validate => false) # if user.new_record? || user.changed? || user.roles_changed?
|
|
111
111
|
user
|