288 if role == 'object'and not rdef.has_perm( |
288 if role == 'object'and not rdef.has_perm( |
289 req, 'add', toeid=entity.eid): |
289 req, 'add', toeid=entity.eid): |
290 continue |
290 continue |
291 # check the target types can be added as well |
291 # check the target types can be added as well |
292 if teschema.may_have_permission('add', req): |
292 if teschema.may_have_permission('add', req): |
293 print 'hop', rschema, teschema, role |
|
294 yield rschema, teschema, role |
293 yield rschema, teschema, role |
295 |
294 |
296 def linkto_url(self, entity, rtype, etype, target): |
295 def linkto_url(self, entity, rtype, etype, target): |
297 return self._cw.build_url('add/%s' % etype, |
296 return self._cw.build_url('add/%s' % etype, |
298 __linkto='%s:%s:%s' % (rtype, entity.eid, target), |
297 __linkto='%s:%s:%s' % (rtype, entity.eid, target), |