tiun 0.0.2 → 0.0.2.1

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: 21e5c97ff2ba65ab332a7fd9e268dba1b75f9a3bc5047158d2f13e83645fc493
4
- data.tar.gz: bbbd5267a33c1191ff2196748e0c95f0f9847713b76dcf7555e02ab3f497accb
3
+ metadata.gz: 9c21b8caf4fec1239c639b03b0f3c62f1ed7af16a0c94d0807c755755465d149
4
+ data.tar.gz: 8a15038e16fb0a0886b157af80acd7310a96cefb45c2770353c2615e0a3ec57b
5
5
  SHA512:
6
- metadata.gz: 0ec044da0a8a1821a9732eb305b864626c301f1fe8c87eea1a6e7e8af55c138acee0cffee09690545241c90938cdc430e0c74a5baeb817c0db0ebf7ab84a1dfd
7
- data.tar.gz: 64060e2051a3b0d280719ce69f3f006400686753a02e28f093e510b91403690486b6e875dfc384628e234ced08549b0b096d36f241c68423510044448b06535e
6
+ metadata.gz: 5cf8adc384fe3b1221108245987724777c91a372a84a1b221ec724ba45a872930ea02f18f1f9ce92e035878899517d8eb89c4ba4aa55b62a602398e12693f62d
7
+ data.tar.gz: 457772ee88082dcaaf646a6faf32081e77d9b60a973c8b9376fcea8ed3c829bc89684abe543f850fc30e6dd4037a6a13929bad89deb0beb2af3fc74a9b5ad417
data/lib/tiun/policy.rb CHANGED
@@ -16,7 +16,7 @@ module Tiun::Policy
16
16
  end
17
17
 
18
18
  def match? allowing_permissions
19
- (user.permissions & allowing_permissions).any?
19
+ user && (user.permissions & allowing_permissions).any?
20
20
  end
21
21
 
22
22
  def scope
data/lib/tiun/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Tiun
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.2.1"
3
3
  end
4
4
 
5
5
  Version = Tiun::VERSION
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiun
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Malo Skrylevo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-05-30 00:00:00.000000000 Z
11
+ date: 2024-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler