equal
deleted
inserted
replaced
202 'read': ('managers', 'users', 'guests',), |
202 'read': ('managers', 'users', 'guests',), |
203 'add': ('managers', 'users'), |
203 'add': ('managers', 'users'), |
204 'delete': ('managers', 'owners'), |
204 'delete': ('managers', 'owners'), |
205 } |
205 } |
206 cardinality = '*1' |
206 cardinality = '*1' |
207 symetric = True |
207 symmetric = True |
208 # NOTE: the 'object = ExternalUri' declaration will still be mandatory |
208 # NOTE: the 'object = ExternalUri' declaration will still be mandatory |
209 # in the cube's schema. |
209 # in the cube's schema. |
210 object = 'ExternalUri' |
210 object = 'ExternalUri' |
211 |
211 |
212 class CWCache(EntityType): |
212 class CWCache(EntityType): |
232 |
232 |
233 # "abtract" relation types, not used in cubicweb itself |
233 # "abtract" relation types, not used in cubicweb itself |
234 |
234 |
235 class identical_to(RelationType): |
235 class identical_to(RelationType): |
236 """identical to""" |
236 """identical to""" |
237 symetric = True |
237 symmetric = True |
238 __permissions__ = { |
238 __permissions__ = { |
239 'read': ('managers', 'users', 'guests',), |
239 'read': ('managers', 'users', 'guests',), |
240 # XXX should have update __permissions__ on both subject and object, |
240 # XXX should have update __permissions__ on both subject and object, |
241 # though by doing this we will probably have no way to add |
241 # though by doing this we will probably have no way to add |
242 # this relation in the web ui. The easiest way to acheive this |
242 # this relation in the web ui. The easiest way to acheive this |
247 'delete': ('managers', RRQLExpression('U has_update_permission S'),), |
247 'delete': ('managers', RRQLExpression('U has_update_permission S'),), |
248 } |
248 } |
249 |
249 |
250 class see_also(RelationType): |
250 class see_also(RelationType): |
251 """generic relation to link one entity to another""" |
251 """generic relation to link one entity to another""" |
252 symetric = True |
252 symmetric = True |
253 __permissions__ = { |
253 __permissions__ = { |
254 'read': ('managers', 'users', 'guests',), |
254 'read': ('managers', 'users', 'guests',), |
255 'add': ('managers', RRQLExpression('U has_update_permission S'),), |
255 'add': ('managers', RRQLExpression('U has_update_permission S'),), |
256 'delete': ('managers', RRQLExpression('U has_update_permission S'),), |
256 'delete': ('managers', RRQLExpression('U has_update_permission S'),), |
257 } |
257 } |