author | Adrien Di Mascio <Adrien.DiMascio@logilab.fr> |
Tue, 26 May 2009 09:03:24 +0200 | |
changeset 1933 | f40ee76ecdf1 |
parent 1802 | d628defebc17 |
child 1977 | 606923dff11b |
permissions | -rw-r--r-- |
0 | 1 |
|
2 |
class Bookmark(MetaUserEntityType): |
|
3 |
"""define an entity type, used to build the application schema""" |
|
4 |
title = String(required=True, maxsize=128) |
|
5 |
path = String(maxsize=512, required=True, |
|
6 |
description=_("relative url of the bookmarked page")) |
|
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1398
diff
changeset
|
7 |
|
1398
5fe84a5f7035
rename internal entity types to have CW prefix instead of E
sylvain.thenault@logilab.fr
parents:
0
diff
changeset
|
8 |
bookmarked_by = SubjectRelation('CWUser', |
0 | 9 |
description=_("users using this bookmark")) |
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1398
diff
changeset
|
10 |
|
0 | 11 |
|
12 |
class bookmarked_by(MetaUserRelationType): |
|
13 |
permissions = {'read': ('managers', 'users', 'guests',), |
|
14 |
# test user in users group to avoid granting permission to anonymous user |
|
15 |
'add': ('managers', RRQLExpression('O identity U, U in_group G, G name "users"')), |
|
16 |
'delete': ('managers', RRQLExpression('O identity U, U in_group G, G name "users"')), |
|
17 |
} |