31 'read': ('managers', 'users', 'guests'), |
31 'read': ('managers', 'users', 'guests'), |
32 'add': ('managers', RRQLExpression('U has_update_permission S')), |
32 'add': ('managers', RRQLExpression('U has_update_permission S')), |
33 'delete': ('managers', RRQLExpression('O owned_by U')), |
33 'delete': ('managers', RRQLExpression('O owned_by U')), |
34 } |
34 } |
35 |
35 |
36 class Note(EntityType): |
36 class Para(EntityType): |
|
37 para = String(maxsize=512) |
|
38 newattr = String() |
|
39 newinlined = SubjectRelation('Affaire', cardinality='?*', inlined=True) |
|
40 newnotinlined = SubjectRelation('Affaire', cardinality='?*') |
|
41 |
|
42 class Note(Para): |
|
43 __specializes_schema__ = True |
|
44 |
37 permissions = {'read': ('managers', 'users', 'guests',), |
45 permissions = {'read': ('managers', 'users', 'guests',), |
38 'update': ('managers', 'owners',), |
46 'update': ('managers', 'owners',), |
39 'delete': ('managers', ), |
47 'delete': ('managers', ), |
40 'add': ('managers', |
48 'add': ('managers', |
41 ERQLExpression('X ecrit_part PE, U in_group G, ' |
49 ERQLExpression('X ecrit_part PE, U in_group G, ' |
44 |
52 |
45 date = Datetime() |
53 date = Datetime() |
46 type = String(maxsize=1) |
54 type = String(maxsize=1) |
47 whatever = Int() |
55 whatever = Int() |
48 mydate = Date(default='TODAY') |
56 mydate = Date(default='TODAY') |
49 para = String(maxsize=512) |
|
50 shortpara = String(maxsize=64) |
57 shortpara = String(maxsize=64) |
51 ecrit_par = SubjectRelation('Personne', constraints=[RQLConstraint('S concerne A, O concerne A')]) |
58 ecrit_par = SubjectRelation('Personne', constraints=[RQLConstraint('S concerne A, O concerne A')]) |
52 attachment = SubjectRelation(('File', 'Image')) |
59 attachment = SubjectRelation(('File', 'Image')) |
|
60 |
|
61 class Text(Para): |
|
62 __specializes_schema__ = True |
|
63 summary = String(maxsize=512) |
53 |
64 |
54 class ecrit_par(RelationType): |
65 class ecrit_par(RelationType): |
55 permissions = {'read': ('managers', 'users', 'guests',), |
66 permissions = {'read': ('managers', 'users', 'guests',), |
56 'delete': ('managers', ), |
67 'delete': ('managers', ), |
57 'add': ('managers', |
68 'add': ('managers', |