permissable-coughdrop 0.2 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/permissable.rb +1 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 279662392438f9b3d5097658bdc85f00c8240d66
4
- data.tar.gz: 056e99c0a71795d3a93ee5e6ff8e297fb831b6ec
3
+ metadata.gz: 7240b08299e2d048b77a0f209e16822178bd2664
4
+ data.tar.gz: c7e61cec2e67a0a678fd84e7c89336c3ccdac040
5
5
  SHA512:
6
- metadata.gz: '0269b47d70e8e005d576bd8c0e7768af3c729b02ee14ef606af5925ed58f88df6f6d5dd825a1baf4aea276b471c17761821f8eb843b0aa83d6e26133b22843cf'
7
- data.tar.gz: 5dddcf55f9de64e4558bf1f770f55dfb2ff9d8250c75006c2ad7f2e72308afa7b6f30ec43f770c7215f94cd93283ed39176a906daf9c61e73048bf72c7ad73e2
6
+ metadata.gz: debf9057a29714e326613dd76a6036cb4e48319621ccffc7eca5cf8a2165bcc8f54f038f93f1f4df7c91e9b77885eab39fb29503d38cafe05a23e1282bb19e5a
7
+ data.tar.gz: b601d1896dbdc422c7cfcd80509316fd4467113245c972d4e256d70e32ecb00995361f553de27b4df2c60701fa3308832f135089845527eccfea3a300758c05a
data/lib/permissable.rb CHANGED
@@ -97,7 +97,7 @@ module Permissable
97
97
  end
98
98
 
99
99
  def permissions_for(user, relevant_scopes=nil)
100
- relevant_scopes ||= self.permission_scopes if self.respond_to?(:permission_scopes) && self.permission_scopes.length > 0
100
+ relevant_scopes ||= self.permission_scopes if user && user.respond_to?(:permission_scopes) && user.permission_scopes.length > 0
101
101
  relevant_scopes ||= self.class.default_permission_scopes
102
102
  relevant_scopes += ['*']
103
103
  if self.class.allow_cached_permissions
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: permissable-coughdrop
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: '0.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Whitmer