nexus_cqrs 0.4.5 → 0.4.6

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: db72b483e967493d5e37a286713381f251518ec32f163ae7815f99c07d7bc3d7
4
- data.tar.gz: 8efd35b594563d0df4e234dd2eba492052aefb3ef995f3e39cac9f071de35a87
3
+ metadata.gz: f161457b535982dea76014d06a36f559a37171e17726ebdbde1d3a6e35c988b8
4
+ data.tar.gz: bba7db5996f94df23f40710d89f89bda13ae5d2d6ac960377063d96e0270655c
5
5
  SHA512:
6
- metadata.gz: c50ca03abdef77895b8c8f3c1a5a1ddff58303c007a82712a2c903ea4a01d66d0e050511908b3b73c1be6d57ec2564ce5430d3e2b000e87a46404e0c8fcb6baa
7
- data.tar.gz: 1dc9aa1d54cacdb47ed56ff35b7f7e20f016bfed6eb78ab79628e60ac4fcf9a8b210ef14a4f5b91446246af5e44a953c05cbd31d632a7085ed2fe70cc9d76bf1
6
+ metadata.gz: 3571626f27df1a94b200bb4a249740c3e12fed54781f4eeb349e3ddf7b07651bb62991e07d77c2a0c85cc9a78149b6ebee471d5e93d9464a39a1a5d4165ec3ca
7
+ data.tar.gz: 02ecda8ebdde1b2c3780f8e5797d8209d83730317ff2d9f53d1bd2762dcd17f30166a8fea62779ca8327b8053fe84679fcc7f051499c184e60539323eae28189
@@ -55,8 +55,12 @@ module NexusCqrs
55
55
  return [] if @user_id.nil?
56
56
 
57
57
  # retrieve entity-specific permissions from DB and map to hash
58
- entity_permissions = permission_model.where(user_id: @user_id, entity_id: entity_id)
59
- .map { |p| { global: false, key: p.permission } }
58
+ entity_permissions = if cached_permissions(permission_model).key?(entity_id)
59
+ cached_permissions(permission_model)[entity_id]
60
+ .map { |p| { global: false, key: p } }
61
+ else
62
+ []
63
+ end
60
64
 
61
65
  # Map global permissions to hash
62
66
  global_permissions = @global_permissions.map { |p| { global: true, key: p } }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module NexusCqrs
3
- # Leave this as 0.4.5 in order for CI process to replace with the tagged version.
4
- VERSION = '0.4.5'
3
+ # Leave this as 0.4.6 in order for CI process to replace with the tagged version.
4
+ VERSION = '0.4.6'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexus_cqrs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dean Lovett
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-02 00:00:00.000000000 Z
11
+ date: 2022-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: generator_spec
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  - !ruby/object:Gem::Version
155
155
  version: '0'
156
156
  requirements: []
157
- rubygems_version: 3.3.8
157
+ rubygems_version: 3.3.9
158
158
  signing_key:
159
159
  specification_version: 4
160
160
  summary: Core package for the nexus cqrs gem