# HG changeset patch # User Sylvain Thénault # Date 1250155454 -7200 # Node ID 85f7502d32bef5ee9d5d3dec4899c81d8cbe42ff # Parent ced3daf78e240a8fe0335235cfc7cb6b9467ed69 access schema through req.vreg diff -r ced3daf78e24 -r 85f7502d32be selectors.py --- a/selectors.py Thu Aug 13 11:07:25 2009 +0200 +++ b/selectors.py Thu Aug 13 11:24:14 2009 +0200 @@ -664,7 +664,7 @@ @lltrace def __call__(self, cls, req, *args, **kwargs): - rschema = cls.schema.rschema(self.rtype) + rschema = req.vreg.schema.rschema(self.rtype) if not (rschema.has_perm(req, self.action) or rschema.has_local_role(self.action)): return 0 @@ -853,7 +853,7 @@ if row is None: score = 0 need_local_check = [] - geteschema = cls.schema.eschema + geteschema = req.vreg.schema.eschema for etype in rset.column_types(0): if etype in BASE_TYPES: return 0 @@ -891,7 +891,7 @@ See `EClassSelector` documentation for behaviour when row is not specified. """ def score(self, cls, req, etype): - eschema = cls.schema.eschema(etype) + eschema = req.vreg.schema.eschema(etype) if not (eschema.is_final() or eschema.is_subobject(strict=True)) \ and eschema.has_perm(req, 'add'): return 1