server/test/data/migrschema/Affaire.py
changeset 0 b97547f5f1fa
child 1802 d628defebc17
equal deleted inserted replaced
-1:000000000000 0:b97547f5f1fa
       
     1 
       
     2 class Affaire(EntityType):
       
     3     permissions = {
       
     4         'read':   ('managers', 'users', 'guests'),
       
     5         'add':    ('managers', ERQLExpression('X concerne S, S owned_by U')),
       
     6         'update': ('managers', 'owners', ERQLExpression('X concerne S, S owned_by U')),
       
     7         'delete': ('managers', 'owners', ERQLExpression('X concerne S, S owned_by U')),
       
     8         }
       
     9     
       
    10     ref = String(fulltextindexed=True, indexed=True,
       
    11                  constraints=[SizeConstraint(16)])
       
    12     sujet = String(fulltextindexed=True,
       
    13                  constraints=[SizeConstraint(256)])
       
    14 
       
    15 class concerne(RelationType):
       
    16     permissions = {
       
    17         'read':   ('managers', 'users', 'guests'),
       
    18         'add':    ('managers', RRQLExpression('U has_update_permission S')),
       
    19         'delete': ('managers', RRQLExpression('O owned_by U')),
       
    20         }
       
    21