author | Nicolas Chauvat <nicolas.chauvat@logilab.fr> |
Mon, 25 May 2009 00:34:49 +0200 | |
branch | stable |
changeset 1919 | 983dfd00df21 |
parent 1802 | d628defebc17 |
child 1977 | 606923dff11b |
permissions | -rw-r--r-- |
0 | 1 |
class Note(EntityType): |
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
2 |
|
0 | 3 |
permissions = {'read': ('managers', 'users', 'guests',), |
4 |
'update': ('managers', 'owners',), |
|
5 |
'delete': ('managers', ), |
|
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
6 |
'add': ('managers', |
0 | 7 |
ERQLExpression('X ecrit_part PE, U in_group G, ' |
8 |
'PE require_permission P, P name "add_note", ' |
|
9 |
'P require_group G'),)} |
|
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
10 |
|
0 | 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', ), |
|
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
22 |
'add': ('managers', |
0 | 23 |
RRQLExpression('O require_permission P, P name "add_note", ' |
24 |
'U in_group G, P require_group G'),) |
|
25 |
} |
|
26 |
inlined = True |