permissable-coughdrop 0.3.3 → 0.3.4

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
  SHA256:
3
- metadata.gz: 3058047a9ec2d7ee3708efe4ec2a45c4b254dfd01132b642957c6990db6d5bab
4
- data.tar.gz: 8975667838984bb331d12c8f0811ab802a95bfcdbb062bc6bfb734f4e1dddbda
3
+ metadata.gz: 43a79613156770bf1baa7268a043f0846870fe9bb588c05a5c664ed1e1b5c7c4
4
+ data.tar.gz: 186d9b2836e64b73dfc91f4b3364fb9fc3741c1c87f80d34e52a7b6a2c06febe
5
5
  SHA512:
6
- metadata.gz: ac4e8f63e8b126bd8e0cde38a6d4e6d5d09cb0a54338130ca6f35dc3c6e12f4cdb20795c97af700c8f77588ed475bea16aed9348267c2a84d45654f28fe403d2
7
- data.tar.gz: 3e5200956c566d51b77cf04538a553f72c454cd3369531f77d266b7b05b5eb415bcf30f262abdbdcaa2b2c988b152acfae64f85d0aa013c4f846c46e13d0e857
6
+ metadata.gz: 35f653c7979e43da7fc427c7121fb522aabcf405918ee61461b901e6f337d885342dbb8fab89bd7e1a354fbbdf4cdda9dc15fd113a4b8444ddbc914e23142b97
7
+ data.tar.gz: ef3d55aa5d0c166ba761305637ceb2e2a44110f67abc6d0eb2ec96cbf6e832ac88d3af49db40121d8170effa16dd545d4a0be57c16dcf1b9fdea3d09a88f13a2
data/lib/permissable.rb CHANGED
@@ -114,7 +114,7 @@ module Permissable
114
114
  granted_permissions.with_indifferent_access if granted_permissions.respond_to?(:with_indifferent_access)
115
115
 
116
116
  self.class.permissions_lookup.each do |actions, block, allowed_scopes|
117
- already_granted = granted_permissions.keys
117
+ already_granted = granted_permissions.select{|k, v| v == true }.map(&:first)
118
118
  next if block.arity == 1 && !user
119
119
  next if actions - already_granted == []
120
120
  if instance_exec(user, &block)
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.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Whitmer