diff -r 058bb3dc685f -r 0b59724cb3f2 cubicweb/test/data/rqlexpr_on_computedrel.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cubicweb/test/data/rqlexpr_on_computedrel.py Sat Jan 16 13:48:51 2016 +0100 @@ -0,0 +1,16 @@ +from yams.buildobjs import ComputedRelation, EntityType, RelationDefinition +from cubicweb.schema import RRQLExpression + +class Subject(EntityType): + pass + +class Object(EntityType): + pass + +class relation(RelationDefinition): + subject = 'Subject' + object = 'Object' + +class computed(ComputedRelation): + rule = 'S relation O' + __permissions__ = {'read': (RRQLExpression('S is ET'),)}