--- a/server/test/data/schema.py Fri Sep 12 09:49:01 2014 +0200
+++ b/server/test/data/schema.py Wed Sep 24 18:04:30 2014 +0200
@@ -1,4 +1,4 @@
-# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of CubicWeb.
@@ -92,6 +92,7 @@
type = String(maxsize=6)
para = String(maxsize=512,
__permissions__ = {
+ 'add': ('managers', ERQLExpression('X in_state S, S name "todo"')),
'read': ('managers', 'users', 'guests'),
'update': ('managers', ERQLExpression('X in_state S, S name "todo"')),
})
@@ -109,6 +110,23 @@
'S,Y')])
todo_by = SubjectRelation('CWUser')
+
+class Frozable(EntityType):
+ __permissions__ = {
+ 'read': ('managers', 'users'),
+ 'add': ('managers', 'users'),
+ 'update': ('managers', ERQLExpression('X frozen False'),),
+ 'delete': ('managers', ERQLExpression('X frozen False'),)
+ }
+ name = String()
+ frozen = Boolean(default=False,
+ __permissions__ = {
+ 'read': ('managers', 'users'),
+ 'add': ('managers', 'users'),
+ 'update': ('managers', 'owners')
+ })
+
+
class Personne(EntityType):
__unique_together__ = [('nom', 'prenom', 'inline2')]
nom = String(fulltextindexed=True, required=True, maxsize=64)