cancancan-neo4j 1.3.3 → 1.3.4
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15cd5f1644e28e0c4f373e4cfd92748bb40ab326
|
4
|
+
data.tar.gz: a6c2b954cc7c9d703447b5cc422cdda35e54afa6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31514fe09287d9ae199db267a0e8dfd52a3cfae57b61435b4601a16b743ef13610a2d4b4f9960687eeaa9531683e62a8589134a34162c9aec735cede901263aa
|
7
|
+
data.tar.gz: 9876f895592dc560006854f845b19a94aebf6ef9dae81a69a4511ce27079142c3cc9a113c919f87b32231822917bee8232ab751370f0f24ae80fec912f99892d
|
@@ -6,7 +6,7 @@ CanCan::ConditionsMatcher.module_eval do
|
|
6
6
|
return nested_subject_matches_conditions?(subject) if subject.class == Hash
|
7
7
|
return matches_conditions_hash?(subject) unless subject_class?(subject)
|
8
8
|
end
|
9
|
-
if @conditions.is_a?(::Neo4j::ActiveNode::Query::QueryProxy)
|
9
|
+
if @conditions.is_a?(::Neo4j::ActiveNode::Query::QueryProxy) || @conditions.is_a?(::Neo4j::ActiveNode::HasN::AssociationProxy)
|
10
10
|
return @conditions.where(id: subject.id).exists? unless subject_class?(subject)
|
11
11
|
end
|
12
12
|
# Don't stop at "cannot" definitions when there are conditions.
|
@@ -12,7 +12,7 @@ module CanCanCan
|
|
12
12
|
|
13
13
|
def records
|
14
14
|
conds = rule.conditions
|
15
|
-
return conds if conds.is_a?(::Neo4j::ActiveNode::Query::QueryProxy)
|
15
|
+
return conds if conds.is_a?(::Neo4j::ActiveNode::Query::QueryProxy) || conds.is_a?(::Neo4j::ActiveNode::HasN::AssociationProxy)
|
16
16
|
return records_for_no_conditions if conds.blank?
|
17
17
|
records_for_hash_conditions
|
18
18
|
end
|