web/uicfg.py
changeset 4077 1d7103a2ec08
parent 4072 ead446e70c28
child 4079 27b9cdc5233c
equal deleted inserted replaced
4076:2e8637a97b89 4077:1d7103a2ec08
   366                 _targetschemas.append(tschema)
   366                 _targetschemas.append(tschema)
   367             if not _targetschemas:
   367             if not _targetschemas:
   368                 continue
   368                 continue
   369             targetschemas = _targetschemas
   369             targetschemas = _targetschemas
   370             if permission is not None:
   370             if permission is not None:
   371                 rdef = eschema.rdef(rschema, targettype=targetschemas[0])
   371                 rdef = eschema.rdef(rschema, role=role, targettype=targetschemas[0])
   372                 # tag allowing to hijack the permission machinery when
   372                 # tag allowing to hijack the permission machinery when
   373                 # permission is not verifiable until the entity is actually
   373                 # permission is not verifiable until the entity is actually
   374                 # created...
   374                 # created...
   375                 if eid is None and '%s_on_new' % permission in permsoverrides.etype_get(eschema, rschema, role):
   375                 if eid is None and '%s_on_new' % permission in permsoverrides.etype_get(eschema, rschema, role):
   376                     yield (rschema, targetschemas, role)
   376                     yield (rschema, targetschemas, role)