doc/book/devrepo/datamodel/definition.rst
changeset 12879 7347715bf0ee
parent 10496 e95b559a06a2
equal deleted inserted replaced
12878:ec05a333f02c 12879:7347715bf0ee
   464 
   464 
   465   class my_relation(RelationDefinition):
   465   class my_relation(RelationDefinition):
   466     __permissions__ = {'read': ('managers', 'users'),
   466     __permissions__ = {'read': ('managers', 'users'),
   467                        'add': ('managers', RRQLExpression('U has_update_permission S')),
   467                        'add': ('managers', RRQLExpression('U has_update_permission S')),
   468                        'delete': ('managers', RRQLExpression('U has_update_permission S'))
   468                        'delete': ('managers', RRQLExpression('U has_update_permission S'))
   469 		       }
   469                        }
   470 
   470 
   471 In the above example, user will be allowed to add/delete `my_relation` if he has
   471 In the above example, user will be allowed to add/delete `my_relation` if he has
   472 the `update` permission on the subject of the relation.
   472 the `update` permission on the subject of the relation.
   473 
   473 
   474 .. note::
   474 .. note::