action_policy 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5c3b8d128bdf4e37224446e7c5a65698327a927c743e99757cf6f5363db93ff5
|
|
4
|
+
data.tar.gz: f046c13d93cff63aa06fd15f4d6375a8498c04d0637110df0ff86891a206fb84
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b66f496343688a55907070ba6b6e82e24a5d358934d6809e1577e80f2c67a81342fe449cbf46942c1e8ff064f79ae898235efa32b63e9fc402e5b416bc223efc
|
|
7
|
+
data.tar.gz: 57088a306e642a0dd22a68c4da019dbd8669e7fa63ec1e99fb7bb819a563ca514be2200c669486d40f5a4b152a325ee0adc3abcaa6187b45c1f0ef37ddcb7a86
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## master
|
|
4
4
|
|
|
5
|
+
## 0.7.2 (2024-11-21)
|
|
6
|
+
|
|
7
|
+
- Fix missing details in deny! message interpolation. ([@palkan][])
|
|
8
|
+
|
|
9
|
+
- Fix implicit authorization target in anonymous controllers. ([@palkan][])
|
|
10
|
+
|
|
11
|
+
- Improve default `ActionPolicy::Unauthorized` error message. ([@Spone][])
|
|
12
|
+
|
|
13
|
+
Before: `Not Authorized` / After: `Not authorized: UserPolicy#create? returns false`
|
|
14
|
+
|
|
5
15
|
## 0.7.1 (2024-07-25)
|
|
6
16
|
|
|
7
17
|
- Support passing scope options to callable scope objects. ([@palkan][])
|
|
@@ -524,3 +534,4 @@ This value is now stored in a cache (if any) instead of just the call result (`t
|
|
|
524
534
|
[@tomdalling]: https://github.com/tomdalling
|
|
525
535
|
[@matsales28]: https://github.com/matsales28
|
|
526
536
|
[@killondark]: https://github.com/killondark
|
|
537
|
+
[@Spone]: https://github.com/Spone
|
|
@@ -56,7 +56,7 @@ module ActionPolicy
|
|
|
56
56
|
# Tries to infer the resource class from controller name
|
|
57
57
|
# (i.e. `controller_name.classify.safe_constantize`).
|
|
58
58
|
def implicit_authorization_target
|
|
59
|
-
controller_name
|
|
59
|
+
controller_name&.classify&.safe_constantize
|
|
60
60
|
end
|
|
61
61
|
|
|
62
62
|
def verify_authorized
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: action_policy
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vladimir Dementyev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-
|
|
11
|
+
date: 2024-11-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ruby-next-core
|