7 """ |
7 """ |
8 from yams.buildobjs import EntityType, RelationType, String |
8 from yams.buildobjs import EntityType, RelationType, String |
9 from cubicweb.schema import RRQLExpression |
9 from cubicweb.schema import RRQLExpression |
10 |
10 |
11 class ToTo(EntityType): |
11 class ToTo(EntityType): |
12 permissions = { |
12 __permissions__ = { |
13 'read': ('managers',), |
13 'read': ('managers',), |
14 'add': ('managers',), |
14 'add': ('managers',), |
15 'update': ('managers',), |
15 'update': ('managers',), |
16 'delete': ('managers',), |
16 'delete': ('managers',), |
17 } |
17 } |
18 attr = String() |
18 attr = String() |
19 |
19 |
20 class attr(RelationType): |
20 class attr(RelationType): |
21 permissions = { |
21 __permissions__ = { |
22 'read': ('managers', ), |
22 'read': ('managers', ), |
23 'add': ('managers', RRQLExpression('S bla Y'),), |
23 'add': ('managers', RRQLExpression('S bla Y'),), |
24 'delete': ('managers',), |
24 'delete': ('managers',), |
25 } |
25 } |