auth-lh 0.10.3 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/auth/lh/version.rb +1 -1
- data/lib/auth_lh/role.rb +1 -1
- data/lib/auth_lh/user.rb +16 -3
- data/lib/auth_lh/user_extended.rb +4 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0a76114a78358627330bf6466708047341ea6b1
|
4
|
+
data.tar.gz: f1fd2beef57605835ce65342745f4c60f73bc4b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79c6376b24006cb03e8611de49f1f92c629ee0628fb8ff2823e5fed2d04441d89992d98bf7e1118995d340212f31670e51593cdede0e9b175fc6f1c36918e593
|
7
|
+
data.tar.gz: dd10bd357424085a137a7d6f42b89930276b301f11b4218d0d0525e350242ecfbd5c0f809f8a98ab731a5adbb87b95bdd13b3d2e04e4ab91750ff9bfa8a27249
|
data/CHANGELOG.md
CHANGED
data/lib/auth/lh/version.rb
CHANGED
data/lib/auth_lh/role.rb
CHANGED
data/lib/auth_lh/user.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
module AuthLh
|
2
2
|
class User
|
3
|
-
attr_accessor :
|
4
|
-
|
5
|
-
|
3
|
+
attr_accessor :email, :jabber, :name, :login, :shop_code,
|
4
|
+
:shop_id, :shop_name, :enabled, :role_codes, :password_expired,
|
5
|
+
:dni, :has_attendance_control, :has_remote_desktop,
|
6
|
+
:fingerprint_from, :fingerprint_to
|
6
7
|
|
7
8
|
def initialize(attributes={})
|
8
9
|
attributes.each do |k,v|
|
@@ -21,6 +22,18 @@ module AuthLh
|
|
21
22
|
def has_role?(role_code)
|
22
23
|
role_codes.include?(role_code.to_s)
|
23
24
|
end
|
25
|
+
|
26
|
+
def has_some_role?(r_codes)
|
27
|
+
r_codes.any? { |r_code|
|
28
|
+
role_codes.include?(r_code.to_s)
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
def has_all_roles?(r_codes)
|
33
|
+
r_codes.all? { |r_code|
|
34
|
+
role_codes.include?(r_code.to_s)
|
35
|
+
}
|
36
|
+
end
|
24
37
|
end
|
25
38
|
end
|
26
39
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
module AuthLh
|
2
2
|
class UserExtended
|
3
|
-
attr_accessor :
|
3
|
+
attr_accessor :email, :jabber, :name, :login, :password_digest,
|
4
4
|
:password_expired, :enabled, :shop_code, :allow_remote_access,
|
5
|
-
:session_timeout, :
|
6
|
-
:
|
7
|
-
:
|
5
|
+
:session_timeout, :only_working_time, :dni, :allow_multiple_sessions,
|
6
|
+
:working_time, :has_attendance_control, :has_remote_desktop,
|
7
|
+
:fingerprint_from, :fingerprint_to
|
8
8
|
|
9
9
|
def initialize(attributes={})
|
10
10
|
attributes.each do |k,v|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: auth-lh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matias Hick
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
93
|
version: '0'
|
94
94
|
requirements: []
|
95
95
|
rubyforge_project:
|
96
|
-
rubygems_version: 2.2.
|
96
|
+
rubygems_version: 2.2.5
|
97
97
|
signing_key:
|
98
98
|
specification_version: 4
|
99
99
|
summary: Authentication with auth lh api
|