permissable-coughdrop 0.2 → 0.3
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7240b08299e2d048b77a0f209e16822178bd2664
|
4
|
+
data.tar.gz: c7e61cec2e67a0a678fd84e7c89336c3ccdac040
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|