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.
- checksums.yaml +4 -4
- data/lib/permissable.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43a79613156770bf1baa7268a043f0846870fe9bb588c05a5c664ed1e1b5c7c4
|
4
|
+
data.tar.gz: 186d9b2836e64b73dfc91f4b3364fb9fc3741c1c87f80d34e52a7b6a2c06febe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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)
|