doc/book/en/development/datamodel/definition.rst
branchstable
changeset 3811 3726e921f537
parent 3581 669854258b90
child 4032 c3a018efe7c9
child 4452 5d6dec2c4650
equal deleted inserted replaced
3809:1b9b51ee543e 3811:3726e921f537
   221 It is possible to define RQL expression to provide update permission
   221 It is possible to define RQL expression to provide update permission
   222 (`add`, `delete` and `update`) on relation and entity types.
   222 (`add`, `delete` and `update`) on relation and entity types.
   223 
   223 
   224 RQL expression for entity type permission :
   224 RQL expression for entity type permission :
   225 
   225 
   226 * you have to use the class `RQLExpression`
   226 * you have to use the class `ERQLExpression`
   227 
   227 
   228 * the used expression corresponds to the WHERE statement of an RQL query
   228 * the used expression corresponds to the WHERE statement of an RQL query
   229 
   229 
   230 * in this expression, the variables X and U are pre-defined references
   230 * in this expression, the variables X and U are pre-defined references
   231   respectively on the current entity (on which the action is verified) and
   231   respectively on the current entity (on which the action is verified) and
   238   to this variable
   238   to this variable
   239 
   239 
   240 For RQL expressions on a relation type, the principles are the same except
   240 For RQL expressions on a relation type, the principles are the same except
   241 for the following :
   241 for the following :
   242 
   242 
   243 * you have to use the class `RQLExpression` in the case of a non-final relation
   243 * you have to use the class `RRQLExpression` in the case of a non-final relation
   244 
   244 
   245 * in the expression, the variables S, O and U are pre-defined references
   245 * in the expression, the variables S, O and U are pre-defined references
   246   to respectively the subject and the object of the current relation (on
   246   to respectively the subject and the object of the current relation (on
   247   which the action is being verified) and the user who executed the query
   247   which the action is being verified) and the user who executed the query
   248 
   248 
   249 * we can also defined rights on attributes of an entity (non-final relation),
   249 * we can also define rights over attributes of an entity (non-final relation),
   250   knowing that :
   250   knowing that :
   251 
   251 
   252   - to define RQL expression, we have to use the class `RQLExpression`
   252   - to define RQL expression, we have to use the class `ERQLExpression`
   253     in which X represents the entity the attribute belongs to
   253     in which X represents the entity the attribute belongs to
   254 
   254 
   255   - the permissions `add` and `delete` are equivalent. Only `add`/`read`
   255   - the permissions `add` and `delete` are equivalent. Only `add`/`read`
   256     are actually taken in consideration.
   256     are actually taken in consideration.
   257 
   257