Commit 766aac92 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Declare base Constraint class as a mixin rather than a document



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39363 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 69af111a
......@@ -28,11 +28,11 @@
#
##############################################################################
from Products.ERP5Type.Core.Constraint import Constraint
from Products.ERP5Type.mixin.constraint import ConstraintMixin
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions
class CategoryExistenceConstraint(Constraint):
class CategoryExistenceConstraint(ConstraintMixin):
"""
This constraint checks whether a category has been defined on this
object (without acquisition). This is only relevant for ZODB
......
......@@ -28,11 +28,11 @@
#
##############################################################################
from Products.ERP5Type.Core.Constraint import Constraint
from Products.ERP5Type.mixin.constraint import ConstraintMixin
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions
class PropertyExistenceConstraint(Constraint):
class PropertyExistenceConstraint(ConstraintMixin):
"""
This constraint checks whether a property has been defined on this
object. This is only relevant for ZODB Property Sheets (filesystem
......
......@@ -37,15 +37,12 @@ from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions
from Products.ERP5Type.Utils import UpperCase
class Constraint(Predicate):
class ConstraintMixin(Predicate):
"""
Constraint implementation (only relevant for ZODB Property sheets,
use Products.ERP5Type.Constraint instead for filesystem Property
Sheets) relying on Predicate
Mixin Constraint implementation (only relevant for ZODB Property
sheets, use Products.ERP5Type.Constraint instead for filesystem
Property Sheets) relying on Predicate
"""
meta_type = 'ERP5 Constraint'
portal_type = 'Constraint'
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment