papers_please 0.1.6 → 0.1.7

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: a7d448638ab001635fe46376c974d09bb62075db10baadd780230dc0a0452fe9
4
- data.tar.gz: 64fca33c1e77f26292369451efbd52afc3b0cc2c0702f85003cbceb3b55bcd02
3
+ metadata.gz: 2e30c2562c1d819ca2e79a1ef7acaccb2372c24bc39c4725f352e3b5275d7e41
4
+ data.tar.gz: 6197ba295f65d24c4d62219de2ee4533474639978b5a78ecc83b4bfcd67b2daa
5
5
  SHA512:
6
- metadata.gz: 8ef6c2fdd93aa6815841dcdb9fe0cf346e05a4a5397f7e0d730a8365d429c6098c8935bcbc34fb935fca4a37f0d6b465d52ea85260aca6d8da5017417752ec03
7
- data.tar.gz: 5ac7390feb0aaba0949c6d5583d93efde2cba583315fafced8c5f8f77efb2206f37401a6195501aab1eaff0376736a170bdbb5554ec5939d603ce47927e8ce0f
6
+ metadata.gz: 1ffe287807f012f1d2b3af3f8e079f54102d94b6e038e87fd3397a28deca0a54a9b25b84e905c9503f9553263daaa6981555ac39856c09aa0f57d7388852e832
7
+ data.tar.gz: 3efd8c9d4950d7e61fa834d52b61589e4af00e68816b416e93b591665c1bda09373c1dc510efdad8b83c24bb3aedd969f58890f2e18e99023981b5733a23794f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- papers_please (0.1.6)
4
+ papers_please (0.1.7)
5
5
  terminal-table
6
6
 
7
7
  GEM
@@ -86,8 +86,9 @@ module PapersPlease
86
86
  end
87
87
 
88
88
  def roles_that_can(action, subject)
89
- applicable_roles.reject do |_, role|
90
- role.find_permission(action, subject).nil?
89
+ applicable_roles.filter do |_, role|
90
+ permission = role.find_permission(action, subject)
91
+ permission&.granted?(user, subject, action) || false
91
92
  end.keys
92
93
  end
93
94
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PapersPlease
4
- VERSION = '0.1.6'
4
+ VERSION = '0.1.7'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: papers_please
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Apsis Labs
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-09 00:00:00.000000000 Z
11
+ date: 2023-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: terminal-table