1 """ |
|
2 |
|
3 :organization: Logilab |
|
4 :copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. |
|
5 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
|
6 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses |
|
7 """ |
|
8 class Note(EntityType): |
|
9 |
|
10 permissions = {'read': ('managers', 'users', 'guests',), |
|
11 'update': ('managers', 'owners',), |
|
12 'delete': ('managers', ), |
|
13 'add': ('managers', |
|
14 ERQLExpression('X ecrit_part PE, U in_group G, ' |
|
15 'PE require_permission P, P name "add_note", ' |
|
16 'P require_group G'),)} |
|
17 |
|
18 date = Datetime() |
|
19 type = String(maxsize=1) |
|
20 whatever = Int() |
|
21 mydate = Date(default='TODAY') |
|
22 para = String(maxsize=512) |
|
23 shortpara = String(maxsize=64) |
|
24 ecrit_par = SubjectRelation('Personne', constraints=[RQLConstraint('S concerne A, O concerne A')]) |
|
25 |
|
26 class ecrit_par(RelationType): |
|
27 permissions = {'read': ('managers', 'users', 'guests',), |
|
28 'delete': ('managers', ), |
|
29 'add': ('managers', |
|
30 RRQLExpression('O require_permission P, P name "add_note", ' |
|
31 'U in_group G, P require_group G'),) |
|
32 } |
|
33 inlined = True |
|