adeia 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/adeia/authorization.rb +4 -4
- data/lib/adeia/version.rb +1 -1
- data/spec/test_app/log/test.log +1903 -0
- 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: ee20a9e9c343ca52486c9c554eb9ee3d1f7635df
|
4
|
+
data.tar.gz: 8b5f9c19b76798f79f498900dc6d4151f798533a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1b254b0414a89c7ae7541f7c9143b5278cb27395c15f157e4df20cc23dabfcd9c5b1a51aba97dd80c76f18b87468ac9de9287deed2eb017530d8caa24c091a8
|
7
|
+
data.tar.gz: bf768dcc26b543688f5dbb85633a9538646afd09191cef51d4e0b771253ab3abb6c71db69421afd834bd67be6139482274821158bcf9c5b5f28a7b7426cf8721
|
data/lib/adeia/authorization.rb
CHANGED
@@ -6,10 +6,10 @@ module Adeia
|
|
6
6
|
class Authorization < Database
|
7
7
|
|
8
8
|
def authorize!
|
9
|
-
|
10
|
-
raise LoginRequired if
|
11
|
-
|
12
|
-
|
9
|
+
token_rights = token_rights(right_name)
|
10
|
+
raise LoginRequired if token_rights[:rights].empty? && @user.nil?
|
11
|
+
action_rights = @user.nil? ? {} : send("#{right_name}_rights")
|
12
|
+
merge_permissions(token_rights, action_rights)
|
13
13
|
raise AccessDenied unless @rights.any? && authorize?
|
14
14
|
end
|
15
15
|
|
data/lib/adeia/version.rb
CHANGED