auth-lh 0.12.1 → 0.13.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.rb +1 -1
- data/lib/auth_lh/role.rb +1 -1
- data/lib/auth_lh/user.rb +0 -4
- data/lib/auth_lh/{authentication.rb → user_management.rb} +1 -17
- 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: 22bd2ce43c5bc8fdbb378dc67ec702c6d8238344
|
4
|
+
data.tar.gz: 9aea9637e9a1da011c2976df82aacdf22ddf812a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c40cde2121c358e1eec31079815b791310fa89be8e4421032b6a70f0d0e299180dd0bc968294ad503cd96ae59c34fd8f090e061f2b1daa7921066d68979cbbad
|
7
|
+
data.tar.gz: bab243d0fcca65ed793a7af79796f4ffdf383eb370ebd856c5b6911454e15f9babe6496c8888a4911107ffff5267347c0299cfca72e02769e56b976f28c1211e
|
data/CHANGELOG.md
CHANGED
data/lib/auth/lh/version.rb
CHANGED
data/lib/auth/lh.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'auth_lh/api'
|
2
|
-
require 'auth_lh/authentication'
|
3
2
|
require 'auth_lh/external_app'
|
4
3
|
require 'auth_lh/external_app_extended'
|
5
4
|
require 'auth_lh/role'
|
@@ -8,6 +7,7 @@ require 'auth_lh/session_response'
|
|
8
7
|
require 'auth_lh/shop'
|
9
8
|
require 'auth_lh/user'
|
10
9
|
require 'auth_lh/user_extended'
|
10
|
+
require 'auth_lh/user_management'
|
11
11
|
|
12
12
|
require 'auth/lh/version'
|
13
13
|
|
data/lib/auth_lh/role.rb
CHANGED
data/lib/auth_lh/user.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module AuthLh
|
2
|
-
module
|
2
|
+
module UserManagement
|
3
3
|
def self.included(base)
|
4
4
|
base.extend(ClassMethods)
|
5
5
|
end
|
@@ -16,22 +16,6 @@ module AuthLh
|
|
16
16
|
@auth_user = val
|
17
17
|
end
|
18
18
|
|
19
|
-
def has_role?(r_code)
|
20
|
-
role_codes.include?(r_code.to_s)
|
21
|
-
end
|
22
|
-
|
23
|
-
def has_some_role?(r_codes)
|
24
|
-
r_codes.any? { |r_code|
|
25
|
-
role_codes.include?(r_code.to_s)
|
26
|
-
}
|
27
|
-
end
|
28
|
-
|
29
|
-
def has_all_roles?(r_codes)
|
30
|
-
r_codes.all? { |r_code|
|
31
|
-
role_codes.include?(r_code.to_s)
|
32
|
-
}
|
33
|
-
end
|
34
|
-
|
35
19
|
module ClassMethods
|
36
20
|
def all_external
|
37
21
|
@cached_users ||= AuthLh::Api.get_users({ pagination: 'false' })
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: auth-lh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matias Hick
|
@@ -65,7 +65,6 @@ files:
|
|
65
65
|
- lib/auth/lh.rb
|
66
66
|
- lib/auth/lh/version.rb
|
67
67
|
- lib/auth_lh/api.rb
|
68
|
-
- lib/auth_lh/authentication.rb
|
69
68
|
- lib/auth_lh/external_app.rb
|
70
69
|
- lib/auth_lh/external_app_extended.rb
|
71
70
|
- lib/auth_lh/role.rb
|
@@ -74,6 +73,7 @@ files:
|
|
74
73
|
- lib/auth_lh/shop.rb
|
75
74
|
- lib/auth_lh/user.rb
|
76
75
|
- lib/auth_lh/user_extended.rb
|
76
|
+
- lib/auth_lh/user_management.rb
|
77
77
|
homepage: https://github.com/unformattmh/auth-lh
|
78
78
|
licenses:
|
79
79
|
- MIT
|