action_authorization 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb47292dbbc20da84de15b97b546bfe3992c15d76ced260631dd3de722e6ea0d
|
4
|
+
data.tar.gz: e832054d9d6c68d969cb1dbe7b5bda50b91fd50f9b3c1b7c88b376275f387f86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be44e07c7f4861eb04733f38684ff960236c702e731b4f5d0cd69f46f0f3dc2b8df6d3f25879ee3d1038d72b8c0e465e8c8c48e98212d3bd54a7430d2fe9a393
|
7
|
+
data.tar.gz: f17d11f851c42110985e49435174a5f66419e3af3a0341196941036008a14fc45912c55d88cb03bd05ef8c3415de3a5b993b40804471e42efcbd2a19277732fe
|
data/lib/action_authorization.rb
CHANGED
@@ -4,6 +4,7 @@ require "active_support/core_ext/module/delegation"
|
|
4
4
|
require "active_support/core_ext/string/inflections"
|
5
5
|
require "action_authorization/version"
|
6
6
|
require "action_authorization/base_policy"
|
7
|
+
require "action_authorization/null_policy"
|
7
8
|
require "action_authorization/authorization_failure"
|
8
9
|
|
9
10
|
module ActionAuthorization
|
@@ -26,6 +27,6 @@ module ActionAuthorization
|
|
26
27
|
end
|
27
28
|
|
28
29
|
def policy_class_for(object)
|
29
|
-
"#{object.model_name}Policy".constantize
|
30
|
+
object.nil? ? NullPolicy : "#{object.model_name}Policy".constantize
|
30
31
|
end
|
31
32
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: action_authorization
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Baldwin
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-09-
|
12
|
+
date: 2024-09-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -39,6 +39,7 @@ files:
|
|
39
39
|
- lib/action_authorization.rb
|
40
40
|
- lib/action_authorization/authorization_failure.rb
|
41
41
|
- lib/action_authorization/base_policy.rb
|
42
|
+
- lib/action_authorization/null_policy.rb
|
42
43
|
- lib/action_authorization/version.rb
|
43
44
|
homepage: https://github.com/wwidea/action_authorization
|
44
45
|
licenses:
|