schemas/bootstrap.py
changeset 3392 36bcf206e157
parent 2476 1294a6bdf3bf
child 3890 d7a270f50f54
equal deleted inserted replaced
3391:b6564d9ca872 3392:36bcf206e157
   171     update_permission = ObjectRelation('CWEType',
   171     update_permission = ObjectRelation('CWEType',
   172                                         description=_('groups allowed to update entities of this type'))
   172                                         description=_('groups allowed to update entities of this type'))
   173 
   173 
   174 
   174 
   175 
   175 
       
   176 class CWProperty(EntityType):
       
   177     """used for cubicweb configuration. Once a property has been created you
       
   178     can't change the key.
       
   179     """
       
   180     permissions = {
       
   181         'read':   ('managers', 'users', 'guests'),
       
   182         'add':    ('managers', 'users',),
       
   183         'update': ('managers', 'owners',),
       
   184         'delete': ('managers', 'owners',),
       
   185         }
       
   186     # key is a reserved word for mysql
       
   187     pkey = String(required=True, internationalizable=True, maxsize=256,
       
   188                   description=_('defines what\'s the property is applied for. '
       
   189                                 'You must select this first to be able to set '
       
   190                                 'value'))
       
   191     value = String(internationalizable=True, maxsize=256)
       
   192 
   176 class relation_type(RelationType):
   193 class relation_type(RelationType):
   177     """link a relation definition to its relation type"""
   194     """link a relation definition to its relation type"""
   178     permissions = META_RTYPE_PERMS
   195     permissions = META_RTYPE_PERMS
   179     inlined = True
   196     inlined = True
   180 
   197