author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Wed, 10 Jun 2009 18:44:10 +0200 | |
branch | stable |
changeset 2093 | e3aaf61f8c66 |
parent 1977 | 606923dff11b |
permissions | -rw-r--r-- |
1977
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1398
diff
changeset
|
1 |
""" |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1398
diff
changeset
|
2 |
|
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1398
diff
changeset
|
3 |
:organization: Logilab |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1398
diff
changeset
|
4 |
:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1398
diff
changeset
|
5 |
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1398
diff
changeset
|
6 |
:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1398
diff
changeset
|
7 |
""" |
0 | 8 |
|
9 |
||
10 |
class test(AttributeRelationType): |
|
11 |
permissions = {'read': ('managers', 'users', 'guests'), |
|
12 |
'delete': ('managers',), |
|
13 |
'add': ('managers',)} |
|
332
86b8d58664eb
backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
0
diff
changeset
|
14 |
|
86b8d58664eb
backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
0
diff
changeset
|
15 |
class fiche(RelationType): |
86b8d58664eb
backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
0
diff
changeset
|
16 |
inlined = True |
86b8d58664eb
backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
0
diff
changeset
|
17 |
subject = 'Personne' |
86b8d58664eb
backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
0
diff
changeset
|
18 |
object = 'Card' |
86b8d58664eb
backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
0
diff
changeset
|
19 |
cardinality = '??' |
86b8d58664eb
backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
0
diff
changeset
|
20 |
|
86b8d58664eb
backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
0
diff
changeset
|
21 |
class multisource_rel(RelationDefinition): |
86b8d58664eb
backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
0
diff
changeset
|
22 |
subject = ('Card', 'Note') |
86b8d58664eb
backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
0
diff
changeset
|
23 |
object = 'Note' |
86b8d58664eb
backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
0
diff
changeset
|
24 |
|
393 | 25 |
class multisource_crossed_rel(RelationDefinition): |
26 |
subject = ('Card', 'Note') |
|
27 |
object = 'Note' |
|
28 |
||
341
0a426be2f3a2
fixes for some cases of neged inlined relations, may have to use (new) IntersectStep. XXX: write IntersectFetchStep
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
332
diff
changeset
|
29 |
class multisource_inlined_rel(RelationType): |
0a426be2f3a2
fixes for some cases of neged inlined relations, may have to use (new) IntersectStep. XXX: write IntersectFetchStep
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
332
diff
changeset
|
30 |
inlined = True |
0a426be2f3a2
fixes for some cases of neged inlined relations, may have to use (new) IntersectStep. XXX: write IntersectFetchStep
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
332
diff
changeset
|
31 |
cardinality = '?*' |
0a426be2f3a2
fixes for some cases of neged inlined relations, may have to use (new) IntersectStep. XXX: write IntersectFetchStep
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
332
diff
changeset
|
32 |
subject = ('Card', 'Note') |
0a426be2f3a2
fixes for some cases of neged inlined relations, may have to use (new) IntersectStep. XXX: write IntersectFetchStep
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
332
diff
changeset
|
33 |
object = ('Affaire', 'Note') |
0a426be2f3a2
fixes for some cases of neged inlined relations, may have to use (new) IntersectStep. XXX: write IntersectFetchStep
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
332
diff
changeset
|
34 |
|
332
86b8d58664eb
backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
0
diff
changeset
|
35 |
|
86b8d58664eb
backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
0
diff
changeset
|
36 |
class see_also(RelationDefinition): |
86b8d58664eb
backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
0
diff
changeset
|
37 |
subject = ('Bookmark', 'Note') |
86b8d58664eb
backport msplanner test from cubicweb-multisources
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
0
diff
changeset
|
38 |
object = ('Bookmark', 'Note') |
360
600dd2fe8b40
backport unittest_ldapuser
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
341
diff
changeset
|
39 |
|
1398
5fe84a5f7035
rename internal entity types to have CW prefix instead of E
sylvain.thenault@logilab.fr
parents:
393
diff
changeset
|
40 |
_euser = import_schema('base').CWUser |
360
600dd2fe8b40
backport unittest_ldapuser
Sylvain Thenault <sylvain.thenault@logilab.fr>
parents:
341
diff
changeset
|
41 |
_euser.__relations__[0].fulltextindexed = True |