|
1 class Note(EntityType): |
|
2 |
|
3 permissions = {'read': ('managers', 'users', 'guests',), |
|
4 'update': ('managers', 'owners',), |
|
5 'delete': ('managers', ), |
|
6 'add': ('managers', |
|
7 ERQLExpression('X ecrit_part PE, U in_group G, ' |
|
8 'PE require_permission P, P name "add_note", ' |
|
9 'P require_group G'),)} |
|
10 |
|
11 date = Datetime() |
|
12 type = String(maxsize=1) |
|
13 whatever = Int() |
|
14 mydate = Date(default='TODAY') |
|
15 para = String(maxsize=512) |
|
16 shortpara = String(maxsize=64) |
|
17 ecrit_par = SubjectRelation('Personne', constraints=[RQLConstraint('S concerne A, O concerne A')]) |
|
18 |
|
19 class ecrit_par(RelationType): |
|
20 permissions = {'read': ('managers', 'users', 'guests',), |
|
21 'delete': ('managers', ), |
|
22 'add': ('managers', |
|
23 RRQLExpression('O require_permission P, P name "add_note", ' |
|
24 'U in_group G, P require_group G'),) |
|
25 } |
|
26 inlined = True |