authentic-jwt 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/authentic_jwt/authorizer.rb +1 -1
- data/lib/authentic_jwt/role.rb +10 -5
- data/lib/authentic_jwt/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: b6a959a8396661244a82b062b3c845bdecd37edf
|
4
|
+
data.tar.gz: 9beedd0588c44827c8d7836bcad72074c79d47c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97261b6075c5f1de47486b02b7be724bc891fc58e51459b6c94be3d55832826182ee1ccad481fb266613331659c33d69e76555f005907f2c8838978b31835dbf
|
7
|
+
data.tar.gz: 4cb551c7fbae0417b48804cd4eacab190132106a9d73d70d6b73a1e61a1602cf19e7b60c79fee25de785f5f3780b9972679a9a1668ec170bf1fca25928135fcf
|
data/lib/authentic_jwt/role.rb
CHANGED
@@ -4,7 +4,7 @@ module AuthenticJwt
|
|
4
4
|
MAPPING.keys
|
5
5
|
end
|
6
6
|
|
7
|
-
def self.
|
7
|
+
def self.enum
|
8
8
|
MAPPING
|
9
9
|
end
|
10
10
|
|
@@ -21,9 +21,14 @@ module AuthenticJwt
|
|
21
21
|
READ = ["subscriber"].freeze
|
22
22
|
WRITE = ["contributor", "author", "editor", "partner", "admin", "internal"].freeze
|
23
23
|
|
24
|
-
MAPPING =
|
25
|
-
|
26
|
-
|
27
|
-
|
24
|
+
MAPPING = {
|
25
|
+
"subscriber" => 10,
|
26
|
+
"contributor" => 20,
|
27
|
+
"author" => 30,
|
28
|
+
"editor" => 40,
|
29
|
+
"partner" => 70,
|
30
|
+
"admin" => 80,
|
31
|
+
"internal" => 90
|
32
|
+
}.freeze
|
28
33
|
end
|
29
34
|
end
|