nexus_cqrs 0.4.9 → 0.4.10
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 +4 -4
- data/lib/nexus_cqrs/auth/auth.rb +4 -1
- data/lib/nexus_cqrs/version.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2de01113624da9f34ad746245040dbe1b3cfe3b7456ef9469276ea55f4028e36
|
4
|
+
data.tar.gz: 4bee563d663c91ec5ab2ce427c5bf85a72fb61cf3d9cc62c421c0d33fa702f95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f72a628ae359b77817d29152df1334f8902234ef5e0882daee4df94d3a3c16c98a67b98fa31815daac2b0952a7124490e6deeae4b50e723bd73434c678dfb362
|
7
|
+
data.tar.gz: 96aec6eced1dfeb88265633a0c9b946235e5acbee2ca640f984829cde61897680d09fbc26c93d259c833b4b46d7432d56fb450ff7c65d81a62d2304cf4fcb7b0
|
data/lib/nexus_cqrs/auth/auth.rb
CHANGED
@@ -24,7 +24,10 @@ module NexusCqrs
|
|
24
24
|
global_permissions = message.metadata[:global_permissions]
|
25
25
|
|
26
26
|
# Raise issue if policy class doesn't exist
|
27
|
-
raise Pundit::NotAuthorizedError,
|
27
|
+
raise Pundit::NotAuthorizedError,
|
28
|
+
query: query,
|
29
|
+
record: record,
|
30
|
+
message: "There is no policy class available for #{record.class}" if policy_class.nil?
|
28
31
|
|
29
32
|
# Instantiate new policy class, with context
|
30
33
|
policy = policy_class.new(UserContext.new(user, global_permissions), record)
|
data/lib/nexus_cqrs/version.rb
CHANGED