--- a/selectors.py Tue Dec 22 09:27:28 2009 +0100
+++ b/selectors.py Tue Dec 22 10:27:49 2009 +0100
@@ -628,7 +628,12 @@
req.form['etype'] = etype
except KeyError:
return 0
- return self.score_class(req.vreg['etypes'].etype_class(etype), req)
+ score = self.score_class(req.vreg['etypes'].etype_class(etype), req)
+ if score:
+ eschema = req.vreg.schema.eschema(etype)
+ if eschema.has_local_role('add') or eschema.has_perm(req, 'add'):
+ return score
+ return 0
class relation_possible(EClassSelector):