equal
deleted
inserted
replaced
619 try: |
619 try: |
620 etype = cls.vreg.case_insensitive_etypes[etype.lower()] |
620 etype = cls.vreg.case_insensitive_etypes[etype.lower()] |
621 req.form['etype'] = etype |
621 req.form['etype'] = etype |
622 except KeyError: |
622 except KeyError: |
623 return 0 |
623 return 0 |
624 return self.score_class(cls.vreg['etypes'].etype_class(etype), req) |
624 score = self.score_class(cls.vreg['etypes'].etype_class(etype), req) |
|
625 if score: |
|
626 eschema = req.vreg.schema.eschema(etype) |
|
627 if eschema.has_local_role('add') or eschema.has_perm(req, 'add'): |
|
628 return score |
|
629 return 0 |
625 |
630 |
626 |
631 |
627 class entity_implements(ImplementsMixIn, EntitySelector): |
632 class entity_implements(ImplementsMixIn, EntitySelector): |
628 """accept if entity instances found in the result set implements at least one |
633 """accept if entity instances found in the result set implements at least one |
629 of the interfaces given as argument. Returned score is the number of |
634 of the interfaces given as argument. Returned score is the number of |