# HG changeset patch # User Stephanie Marcu # Date 1287750999 -7200 # Node ID b5ed84c53b3fa7153f3de51990290b0c2ed6fd1f # Parent 37b7f4df46b3dbd6429c6329dd0a69af02ec9c0a [book] complete datamodel definition section with default permissions diff -r 37b7f4df46b3 -r b5ed84c53b3f 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 ````````````````````````