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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a01855a1bb516984482d2cbdaa7020445431786
4
- data.tar.gz: 077068256ee217f616c28322931be7500e8fb967
3
+ metadata.gz: aeeb73f38e7343acd9777fa9b949a154ace2c707
4
+ data.tar.gz: 4ffbfe5b29bbc5feff541ca6aacd0cac9c88d4b3
5
5
  SHA512:
6
- metadata.gz: 6e9fd1e2c0af98fff7ce34b6bfe0300490a718c5408d4d7da9f49f84d709070c4ec1163a9fa4ebc90f579295ffa10b7068ba819f3822d4d39241561790af6db5
7
- data.tar.gz: 120341150092ad1327e8cac8a20ba4c321215c504c2964265920cd33762a4670b87bbeaf9b66c86cce5c99f6ce5827673531f4aaaa91d7f2a2d743fad48838cc
6
+ metadata.gz: e2687af1a484c73eddbda0db7f82e9518f2afac6cd3a527d2660434a0229bf02d890eb556747e9dffa9c7f43188d564b7c97289cc311669a4f0eaecdfdb3fb93
7
+ data.tar.gz: 831d7edbf365a72fcbe75dca4ec97b596d7582d334371ce7f634154dee366877e6c47e6a1855343545223e9ad5516098c5389dc9b452ad75d55ebf93a7c19628
@@ -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
- groups = convert_to_objects ado.cn_groups
112
- groups.each do |g|
113
- @cn_groups_nested.push g if !(@cn_groups_nested.include?(g))
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
@@ -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
@@ -1,4 +1,4 @@
1
1
  module Adauth
2
2
  # Adauths Version Number
3
- Version = '2.0.3'
3
+ Version = '2.0.4'
4
4
  end
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.3
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: 2013-09-05 00:00:00.000000000 Z
11
+ date: 2014-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake