cratus 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cratus/user.rb +2 -2
- data/lib/cratus/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcc42a91850c24730a36d61f38e48b2a0db73972
|
4
|
+
data.tar.gz: 9d9a96515547a15e6744f5c0d13179ce51001be7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ec26ce5a450ec200c286195388e1f650fe418ca318167446b1742f58ed78b217ff9c31b11d9777bd5d2ab852e17e927192588d6d55cff1c7f68d48ac12dc298
|
7
|
+
data.tar.gz: d3bea33a3efd9169ede51b5948fc1a0d0ce5a4b9c65856b70460ab4968feaa05cf8c77d90cc6065e7aeb7f9f99017ec8adb597af5f8e7c69f4d58d33fe51cb65
|
data/lib/cratus/user.rb
CHANGED
@@ -31,14 +31,14 @@ module Cratus
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def lockouttime
|
34
|
-
@raw_ldap_data[Cratus.config.user_lockout_attribute].last
|
34
|
+
Integer(@raw_ldap_data[Cratus.config.user_lockout_attribute].last.to_s)
|
35
35
|
end
|
36
36
|
|
37
37
|
# https://fossies.org/linux/web2ldap/pylib/w2lapp/schema/plugins/activedirectory.py
|
38
38
|
# https://msdn.microsoft.com/en-us/library/windows/desktop/ms676843(v=vs.85).aspx
|
39
39
|
#
|
40
40
|
def locked?
|
41
|
-
return false if lockouttime
|
41
|
+
return false if lockouttime.zero?
|
42
42
|
epoch = 116_444_736_000_000_000
|
43
43
|
current = Time.now.to_i * 10_000_000
|
44
44
|
current - (lockouttime - epoch) < lockoutduration
|
data/lib/cratus/version.rb
CHANGED