--- a/server/sources/__init__.py Thu Aug 27 17:01:32 2009 +0200
+++ b/server/sources/__init__.py Thu Aug 27 17:02:02 2009 +0200
@@ -182,6 +182,19 @@
return wsupport
return True
+ def may_cross_relation(self, rtype):
+ """return True if the relation may be crossed among sources. Rules are:
+
+ * if this source support the relation, can't be crossed unless explicitly
+ specified in .cross_relations
+
+ * if this source doesn't support the relation, can be crossed unless
+ explicitly specified in .dont_cross_relations
+ """
+ if self.support_relation(rtype):
+ return rtype in self.cross_relations
+ return rtype not in self.dont_cross_relations
+
def eid2extid(self, eid, session=None):
return self.repo.eid2extid(self, eid, session)