active_directory_login 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_directory_login/client.rb +4 -3
- data/lib/active_directory_login/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: 63b9cf4eecc7eaf6e94dc82d3b6dd506ce6e9b02
|
4
|
+
data.tar.gz: 039ab17cd271f16b8ce4ac32d0b0c9fca292b3a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71891b137ac6431cb7622dd5a79a8b7cc86ab22e880607e58148f27a332150b5a99d6ef439e95b6ccc61cc26865d2ec399f99806630c6ca0c77a5fafb683f0d3
|
7
|
+
data.tar.gz: 471b431e92ff88b5caad28cdc840c1ad5ffc97acf3fc55e04bb508f09e6cd37477c1fbdea59ac7f438f456793764e247cd9c60ad950f86c0a90c37f1f6a39eaf
|
@@ -172,7 +172,7 @@ module ActiveDirectoryLogin
|
|
172
172
|
|
173
173
|
# update staff
|
174
174
|
staff_group = find_group(staff_dn)
|
175
|
-
staff_member_names = staff_group
|
175
|
+
staff_member_names = (staff_group[:member] || []).map { |u| u.sAMAccountName.downcase }
|
176
176
|
|
177
177
|
# users not flagged as staff in docgenie but in AD staff group
|
178
178
|
allowed = User.where(staff: false).where("lower(username) IN (:names)", { names: staff_member_names })
|
@@ -196,9 +196,10 @@ module ActiveDirectoryLogin
|
|
196
196
|
staff_created_names = pending
|
197
197
|
|
198
198
|
|
199
|
+
|
199
200
|
## update superuser
|
200
201
|
superuser_group = find_group(superuser_dn)
|
201
|
-
superuser_member_names = superuser_group
|
202
|
+
superuser_member_names = (superuser_group[:member] || []).map { |u| u.sAMAccountName.downcase } - staff_member_names
|
202
203
|
|
203
204
|
allowed = User.where(staff: false).where("lower(username) IN (:names)", { names: superuser_member_names })
|
204
205
|
allowed.update_all(superuser: true)
|
@@ -223,7 +224,7 @@ module ActiveDirectoryLogin
|
|
223
224
|
|
224
225
|
## update users
|
225
226
|
user_group = find_group(user_dn)
|
226
|
-
member_names = user_group
|
227
|
+
member_names = (user_group[:member] || []).map { |u| u.sAMAccountName.downcase }
|
227
228
|
member_names = member_names - superuser_member_names - staff_member_names
|
228
229
|
|
229
230
|
allowed = User.where(staff: false, superuser: false).where.not(locked_at: nil).where("lower(username) IN (:names)", { names: member_names })
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_directory_login
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brad Murray
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|