adauth 2.0.3 → 2.0.4
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/lib/adauth/ad_object.rb +6 -4
- data/lib/adauth/authenticate.rb +1 -1
- data/lib/adauth/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aeeb73f38e7343acd9777fa9b949a154ace2c707
|
4
|
+
data.tar.gz: 4ffbfe5b29bbc5feff541ca6aacd0cac9c88d4b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2687af1a484c73eddbda0db7f82e9518f2afac6cd3a527d2660434a0229bf02d890eb556747e9dffa9c7f43188d564b7c97289cc311669a4f0eaecdfdb3fb93
|
7
|
+
data.tar.gz: 831d7edbf365a72fcbe75dca4ec97b596d7582d334371ce7f634154dee366877e6c47e6a1855343545223e9ad5516098c5389dc9b452ad75d55ebf93a7c19628
|
data/lib/adauth/ad_object.rb
CHANGED
@@ -108,9 +108,11 @@ module Adauth
|
|
108
108
|
@cn_groups_nested = cn_groups
|
109
109
|
cn_groups.each do |group|
|
110
110
|
ado = Adauth::AdObjects::Group.where('name', group).first
|
111
|
-
|
112
|
-
|
113
|
-
|
111
|
+
if ado
|
112
|
+
groups = convert_to_objects ado.cn_groups
|
113
|
+
groups.each do |g|
|
114
|
+
@cn_groups_nested.push g if !(@cn_groups_nested.include?(g))
|
115
|
+
end
|
114
116
|
end
|
115
117
|
end
|
116
118
|
return @cn_groups_nested
|
@@ -199,4 +201,4 @@ module Adauth
|
|
199
201
|
end
|
200
202
|
end
|
201
203
|
end
|
202
|
-
end
|
204
|
+
end
|
data/lib/adauth/authenticate.rb
CHANGED
@@ -23,7 +23,7 @@ module Adauth
|
|
23
23
|
|
24
24
|
# Check if the user is allowed to login
|
25
25
|
def self.allowed_to_login(user)
|
26
|
-
(allowed_from_arrays(@config.allowed_groups, @config.denied_groups, user.cn_groups_nested) && allowed_from_arrays(@config.allowed_ous, @config.denied_ous, user.dn_ous))
|
26
|
+
(((@config.allowed_groups.empty? && @config.denied_groups.empty?) || allowed_from_arrays(@config.allowed_groups, @config.denied_groups, user.cn_groups_nested)) && ((@config.allowed_ous.empty? && @config.denied_ous.empty?) || allowed_from_arrays(@config.allowed_ous, @config.denied_ous, user.dn_ous)))
|
27
27
|
end
|
28
28
|
|
29
29
|
private
|
data/lib/adauth/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adauth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam "Arcath" Laycock
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|