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 |
|
9 class Affaire(EntityType): |
|
10 permissions = { |
|
11 'read': ('managers', 'users', 'guests'), |
|
12 'add': ('managers', ERQLExpression('X concerne S, S owned_by U')), |
|
13 'update': ('managers', 'owners', ERQLExpression('X concerne S, S owned_by U')), |
|
14 'delete': ('managers', 'owners', ERQLExpression('X concerne S, S owned_by U')), |
|
15 } |
|
16 |
|
17 ref = String(fulltextindexed=True, indexed=True, |
|
18 constraints=[SizeConstraint(16)]) |
|
19 sujet = String(fulltextindexed=True, |
|
20 constraints=[SizeConstraint(256)]) |
|
21 |
|
22 class concerne(RelationType): |
|
23 permissions = { |
|
24 'read': ('managers', 'users', 'guests'), |
|
25 'add': ('managers', RRQLExpression('U has_update_permission S')), |
|
26 'delete': ('managers', RRQLExpression('O owned_by U')), |
|
27 } |
|
28 |
|