[book] complete datamodel definition section with default permissions
authorStephanie Marcu <stephanie.marcu@logilab.fr>
Fri, 22 Oct 2010 14:36:39 +0200
changeset 6591 b5ed84c53b3f
parent 6590 37b7f4df46b3
child 6592 4dad0ec0a44f
[book] complete datamodel definition section with default permissions
doc/book/en/devrepo/datamodel/definition.rst
--- a/doc/book/en/devrepo/datamodel/definition.rst	Fri Oct 22 14:32:59 2010 +0200
+++ b/doc/book/en/devrepo/datamodel/definition.rst	Fri Oct 22 14:36:39 2010 +0200
@@ -304,7 +304,7 @@
 
 * we associate rights at the entities/relations schema level
 
-* the default groups are: `administrators`, `users` and `guests`
+* the default groups are: `managers`, `users` and `guests`
 
 * users belong to the `users` group
 
@@ -334,6 +334,34 @@
 provided if the user is in one of the listed groups or if one of the RQL condition
 is satisfied.
 
+Default permissions
+```````````````````
+
+The default permissions for ``EntityType`` are:
+
+.. sourcecode:: python
+
+   __permissions__ = {
+        'read': ('managers', 'users', 'guests',),
+        'update': ('managers', 'owners',),
+        'delete': ('managers', 'owners'),
+        'add': ('managers', 'users',)
+        }
+
+The default permissions for relations are:
+
+.. sourcecode:: python
+
+   __permissions__ = {'read': ('managers', 'users', 'guests',),
+                    'delete': ('managers', 'users'),
+                    'add': ('managers', 'users',)}
+
+The default permissions for attributes are:
+
+.. sourcecode:: python
+
+   __permissions__ = {'read': ('managers', 'users', 'guests',),
+                     'update': ('managers', ERQLExpression('U has_update_permission X')),}
 
 The standard user groups
 ````````````````````````