nexus_cqrs 0.4.7 → 0.4.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nexus_cqrs/auth/permission_provider.rb +3 -3
- 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: 5eaaa5907400751d2a1e04da16226885b6945a6d04ec5c10b513cec92e10123a
|
4
|
+
data.tar.gz: aecdbe537dd07314b8e5d66d4c312a353b2d23fade004412a26998c041ea7af0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbc0b64117f244c62d96f9fb75c7c030e9d8ab62e4cf206396066dbf7eeb416fda0787c506d567eae31d56d06e135eee1922fbcbc48411b937505fe33d90186f
|
7
|
+
data.tar.gz: 2c103ccfa697dad306e40eebe48b856bfd7bc2e347ce728bce8c560adc68c2a2c31f007c0c556d637a78daaf967c9f1127c4e196d842ac5ffb3ea3cafd5aa4fb
|
@@ -71,7 +71,7 @@ module NexusCqrs
|
|
71
71
|
|
72
72
|
# Retrieves a list of permissions assigned to a user for ANY entity ID
|
73
73
|
#
|
74
|
-
# @param [
|
74
|
+
# @param [Class] permission_model Permission model class
|
75
75
|
# @return [Hash] Returns a hash representing each entity and the user's permissions
|
76
76
|
# @example Get a list of permissions
|
77
77
|
# permissions.for_user(CollectionPermissions) #=>
|
@@ -117,10 +117,10 @@ module NexusCqrs
|
|
117
117
|
# Retrieve all the permissions for this user for a specific model and cache it for this request (as all calls to
|
118
118
|
# a PermissionProvider in the same request will all have the same permissions, this saves on many SQL calls)
|
119
119
|
#
|
120
|
-
# @param [
|
120
|
+
# @param [Class] permission_model Class for the permission model being used.
|
121
121
|
# @see PermissionProvider#for_user
|
122
122
|
def cached_permissions(permission_model)
|
123
|
-
::RequestStore.store["permissions_#{permission_model.
|
123
|
+
::RequestStore.store["permissions_#{permission_model.name}"] ||= for_user(permission_model)
|
124
124
|
end
|
125
125
|
end
|
126
126
|
end
|
data/lib/nexus_cqrs/version.rb
CHANGED