entity.py
branchstable
changeset 3961 d1cbf77db999
parent 3955 235a9fda6058
child 3998 94cc7cad3d2d
child 4212 ab6573088b4a
equal deleted inserted replaced
3960:8cbf18c703be 3961:d1cbf77db999
   767             args = {}
   767             args = {}
   768             securitycheck_args = {}
   768             securitycheck_args = {}
   769         insertsecurity = (rtype.has_local_role('add') and not
   769         insertsecurity = (rtype.has_local_role('add') and not
   770                           rtype.has_perm(self.req, 'add', **securitycheck_args))
   770                           rtype.has_perm(self.req, 'add', **securitycheck_args))
   771         constraints = rtype.rproperty(subjtype, objtype, 'constraints')
   771         constraints = rtype.rproperty(subjtype, objtype, 'constraints')
       
   772         # XXX consider constraint.mainvars to check if constraint apply
   772         if vocabconstraints:
   773         if vocabconstraints:
   773             # RQLConstraint is a subclass for RQLVocabularyConstraint, so they
   774             # RQLConstraint is a subclass for RQLVocabularyConstraint, so they
   774             # will be included as well
   775             # will be included as well
   775             restriction += [cstr.restriction for cstr in constraints
   776             restriction += [cstr.restriction for cstr in constraints
   776                             if isinstance(cstr, RQLVocabularyConstraint)]
   777                             if isinstance(cstr, RQLVocabularyConstraint)]