papers_please 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/papers_please/policy.rb +6 -1
- data/lib/papers_please/version.rb +1 -1
- metadata +3 -4
- data/.travis.yml +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7d448638ab001635fe46376c974d09bb62075db10baadd780230dc0a0452fe9
|
4
|
+
data.tar.gz: 64fca33c1e77f26292369451efbd52afc3b0cc2c0702f85003cbceb3b55bcd02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ef6c2fdd93aa6815841dcdb9fe0cf346e05a4a5397f7e0d730a8365d429c6098c8935bcbc34fb935fca4a37f0d6b465d52ea85260aca6d8da5017417752ec03
|
7
|
+
data.tar.gz: 5ac7390feb0aaba0949c6d5583d93efde2cba583315fafced8c5f8f77efb2206f37401a6195501aab1eaff0376736a170bdbb5554ec5939d603ce47927e8ce0f
|
data/Gemfile.lock
CHANGED
data/lib/papers_please/policy.rb
CHANGED
@@ -8,6 +8,7 @@ module PapersPlease
|
|
8
8
|
|
9
9
|
def initialize(user)
|
10
10
|
@user = user
|
11
|
+
@default_scope = nil
|
11
12
|
@roles = {}
|
12
13
|
@cache = {}
|
13
14
|
|
@@ -18,6 +19,10 @@ module PapersPlease
|
|
18
19
|
@fallthrough = true
|
19
20
|
end
|
20
21
|
|
22
|
+
def default_scope(scope)
|
23
|
+
@default_scope = scope
|
24
|
+
end
|
25
|
+
|
21
26
|
def configure
|
22
27
|
raise NotImplementedError, 'The #configure method of the access policy was not implemented'
|
23
28
|
end
|
@@ -100,7 +105,7 @@ module PapersPlease
|
|
100
105
|
return scope
|
101
106
|
end
|
102
107
|
|
103
|
-
nil
|
108
|
+
@default_scope || nil
|
104
109
|
end
|
105
110
|
alias query scope_for
|
106
111
|
|
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.
|
4
|
+
version: 0.1.6
|
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-
|
11
|
+
date: 2023-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: terminal-table
|
@@ -134,7 +134,6 @@ files:
|
|
134
134
|
- ".gitignore"
|
135
135
|
- ".rspec"
|
136
136
|
- ".rubocop.yml"
|
137
|
-
- ".travis.yml"
|
138
137
|
- Gemfile
|
139
138
|
- Gemfile.lock
|
140
139
|
- LICENSE.txt
|
@@ -171,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
171
170
|
- !ruby/object:Gem::Version
|
172
171
|
version: '0'
|
173
172
|
requirements: []
|
174
|
-
rubygems_version: 3.
|
173
|
+
rubygems_version: 3.0.3.1
|
175
174
|
signing_key:
|
176
175
|
specification_version: 4
|
177
176
|
summary: A roles & permissions gem for ruby applications.
|